Hello Support,
I'm using ASPXToPDF to create a pdf file of my company's website. We provide the customer with two methods:
- Download the pdf file (in code:
ASPXToPDF.RenderAsPDF(PdfFilename);)
- Email the pdf file (in code:
ASPXToPDF.RenderAsPDF(false);, with post processing)
The page is a dashboard, so in order to provide our users with a useful pdf, we load an additional css file when the page is rendered by the ASPXToPDF. This is necessary since we need to change certain margins.
The issue we're noticing is that there seems to be a difference between the two methods after the rendering has completed. The resulting pdf looks perfect and the first method works great. The second method however causes the client's window to be redrawn, showing the rendered page of the pdf.
In other words:
Code:
if (toBeEmailed)
{
ASPXToPDF.RenderAsPDF(false); // Causes rendering to display on client's screen.
}
else
{
ASPXToPDF.RenderAsPDF(PdfFilename); // Works fine.
}
There is no difference in the method ASPXToPDF_BeforeRender() for either method, and no code is executed in ASPXToPDF_AfterRender().
I'm at a loss what causes this behaviour, and I don't know how to further debug it. Can you shed a light on this?
With kind regards,
Robin van Olst