Welcome Guest Search | Active Topics | Sign In | Register

ASPXToPDF does not print contents in PlaceHolder Options
Eric
Posted: Thursday, July 3, 2014 8:00:44 AM
Rank: Newbie
Groups: Member

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

ASPXToPDF does not print any controls that are dynamically added to a placeholder. Is this by design? Or am I doing something wrong :).


Many thanks in advance,
Eric
eo_support
Posted: Thursday, July 3, 2014 10:32:33 AM
Rank: Administration
Groups: Administration

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

ASPXToPDF works in a transparent manner. So please try to comment out the call to RenderAsPDF and then see if you get the same result. For example, if you have an "Export to PDF" button and inside the button's Click handler you call ASPXToPDF's RenderAsPDF method, then try to remove or comment out that line (so now the handler is empty) and run your page again. If you click the button and see your dynamically added control on screen, then they should appear in the result PDF file once you put RenderAsPDF back. If you do not see any of your dynamically added controls, then you won't see it in your PDF file.

You can think ASPXToPDF as an "output redirector". Everything flow/code that runs when the redirector is off will run when the redirector is on. So the first thing you want to check is whether the problem happens when the "redirector" is off. Once you get everything working when it's off, you can just put the line back to turn the "redirector" on and you should get the same result as on the screen.

Hope this helps. Please feel free to let us know if there is anything else.

Thanks!
Eric
Posted: Friday, July 4, 2014 8:09:44 AM
Rank: Newbie
Groups: Member

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

You're right. I forgot when having a post-back, you need to re-add the controls to the placeholder(s). It al works now


Thank you for your support.


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.