Welcome Guest Search | Active Topics | Sign In | Register

ASPX to PDF Inquiry Options
Dean
Posted: Wednesday, September 7, 2011 10:28:21 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2011
Posts: 2
Hi,

I'm exploring available options to do the following:

1.) Render the current .aspx web form as a PDF (button click calling RenderAsPDF() )
2.) Upload/import that rendered PDF into our content management system after the RenderAsPDF method

So I was wondering, without digging too deep into the documentation, if it were possible to store the rendered PDF as an object to pass into our content management system behind the scenes, without any user interaction.
eo_support
Posted: Wednesday, September 7, 2011 10:41:40 AM
Rank: Administration
Groups: Administration

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

Yes. You can do that. By default, RenderAsPDF sends the result to the client browser. However you can cancel that. You would then get a PdfDocument object in memory, with that you can do anything you need to do.

In order to cancel the default behavior, you will need to handle the controls' AfterRender event and set e.Cancel to true in your event handler. You will also need to make sure you have the latest EO.Web Controls. This feature does not work correctly in early versions.

Thanks
Dean
Posted: Wednesday, September 7, 2011 10:44:40 AM
Rank: Newbie
Groups: Member

Joined: 9/7/2011
Posts: 2
eo_support wrote:
Hi,

Yes. You can do that. By default, RenderAsPDF sends the result to the client browser. However you can cancel that. You would then get a PdfDocument object in memory, with that you can do anything you need to do.

In order to cancel the default behavior, you will need to handle the controls' AfterRender event and set e.Cancel to true in your event handler. You will also need to make sure you have the latest EO.Web Controls. This feature does not work correctly in early versions.

Thanks


Thanks so much for the answer. This helps me a lot!
eo_support
Posted: Wednesday, September 7, 2011 10:46:44 AM
Rank: Administration
Groups: Administration

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

You are very welcome. 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.