Welcome Guest Search | Active Topics | Sign In | Register

How to get the file stream of the PDF file generated from ASPXToPDF1 control Options
kesav7902
Posted: Thursday, February 7, 2013 4:18:52 PM
Rank: Newbie
Groups: Member

Joined: 2/7/2013
Posts: 3
Hi,

I am currently evaluating your product. I wanted to create a pdf file from the asp.net web form and save it in a location using the file stream (system.IO) namespace.

Please suggest the right approach by using your controls.


Thanks,
Kesava.
eo_support
Posted: Thursday, February 7, 2013 4:21:46 PM
Rank: Administration
Groups: Administration

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

Please see here for more details:

http://www.essentialobjects.com/doc/4/web/aspxtopdf.aspx#save

Thanks!
kesav7902
Posted: Thursday, February 7, 2013 4:41:11 PM
Rank: Newbie
Groups: Member

Joined: 2/7/2013
Posts: 3
Hi,

I have tried the above instructions but with the below code i am getting object reference errors:

ASPXToPDF1.RenderAsPDF(false);
HtmlToPdfResult result = (HtmlToPdfResult)ASPXToPDF1.Result;

result.PdfDocument.Save("Test.PDF");

Please help.
eo_support
Posted: Thursday, February 7, 2013 4:53:01 PM
Rank: Administration
Groups: Administration

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

Please read it carefully again. You get the result from the controls' AfterRender event handler.

Thanks!
kesav7902
Posted: Thursday, February 7, 2013 5:01:20 PM
Rank: Newbie
Groups: Member

Joined: 2/7/2013
Posts: 3
thanks it works. will look forward to suggest the product.
eo_support
Posted: Thursday, February 7, 2013 5:09:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Glad to hear that! 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.