Welcome Guest Search | Active Topics | Sign In | Register

Enquiry about ASPX to PDF Options
Fyreblaze
Posted: Tuesday, February 21, 2012 10:55:08 AM
Rank: Newbie
Groups: Member

Joined: 2/21/2012
Posts: 1
Hi,

i have some questions and i wonder whether the following is possible to achieve using ASPX to PDF

1) Upon PageLoad(VB.net) to execute the RenderAsPDF()

2) After which storing the PDF on a location on a webserver.

I was wondering whether it is possible without the clicking of buttons to store the aspx page into a pdf automatically upon page load and save it in a location.

Thanks in advance
eo_support
Posted: Tuesday, February 21, 2012 6:12:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,201
Hi,

You can do both fine. To store the PDF on a location on the web server, you will need to:

1. Handle the ASPXToPDF controls' AfterRender event. Inside that event you can get the PdfDocument object, you can then use that object to save the PDF file to disk. See here for sample code:

http://www.essentialobjects.com/doc/1/eo.web.aspxtopdf.afterrender.aspx

2. Optionally, you will need to call RenderAsPDF(false) to prevent the same PDF file being sent to client side. Note the additional "false" argument passed to RenderAsPDF;

Hope this helps. Please feel free to let us know if you have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.