is there something as DrawPdfToFile instead of DrawPdfToWeb

is there something as DrawPdfToFile instead of DrawPdfToWeb

Forum member · Aug 3, 2007
I would like to save the generated pdf to the server before sending it to the webclient So code would look like: private void Page_Load(object sender, System.EventArgs e) { ... Parameters.Add("doLanguage", Request.QueryString["l"]); ... DrawPdfToFile("C:\inetpub\wwwroot\savetest\quotation.pdf" ); DrawPdfToWeb("quotation.pdf" ); } Is this possible ?

Re: is there something as DrawPdfToFile instead of DrawPdfToWeb

Support · Aug 3, 2007
Hello, Yes, you can save the PDF document in the server without any problem. You will have to use the Document object to save the PDF using the Draw method. Following is the sample code for this when using the Webform. DocumentLayout report = this.DocumentLayout; Document document = report.Run(); document.Draw("C:\Temp\quotation.pdf"); document.DrawToWeb(); Thanks, ceTe Software Support Team.

Re: is there something as DrawPdfToFile instead of DrawPdfToWeb

Forum member · Aug 3, 2007
I'm getting an error on line 137... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 135: // Pdf opslaan op server Line 136: DocumentLayout report = new DocumentLayout(@"E:\\inetpub\\wwwroot\\stoneasy\\site\\pdf\\pricequote.aspx.dplx"); Line 137: Document document = report.Run(); Line 138: document.Draw("E:\\inetpub\\wwwroot\\stoneasy\\quotations\\quotation_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".pdf"); Line 139:

Re: is there something as DrawPdfToFile instead of DrawPdfToWeb

Support · Aug 3, 2007
Hello, The error you are getting could be because of some Null values from the database and please double check that your query is not returning any Null values. Please try with the latest dll files downloaded from the CustomerArea by logging in using your serial number and see if this solves. Please send over the full stack trace of the error and the dplx file to our [^a|mailto:support@cete.com|Support Team^] if you are still getting the error. Thanks, ceTe Software Support Team.