|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
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
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
You are very welcome. Please feel free to let us know if you have any more questions.
Thanks!
|
|