Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1070
WebDocumentExporter
posted

Dear Support team,

 I am able to export content to pdf with WebDocumentExporter1. How to save the pdf file in the server itself (which can be predefined).

 Our scenrio is - Automated mail triggers which will create and attach pdf files. We need a copy of pdf files to be stored in a folder.

Parents
  • 37874
    posted

    Hi DayanaArul,

    You could achieve this using code similar to the following:

        protected void Button1_Click(object sender, EventArgs e)

        {

            WebDocumentExporter1.ExportMode = Infragistics.Web.UI.GridControls.ExportMode.Custom;

            WebDocumentExporter1.Format = Infragistics.Web.UI.GridControls.FileFormat.PDF;

            Report r = new Report();

            WebDocumentExporter1.Export(r, WebDataGrid1);

            r.Publish(Server.MapPath("report.pdf"), FileFormat.PDF);

        }

    This will save the grid in a pdf file in your project’s root directory.

    Please let me know if you have any questions.

Reply Children
No Data