Welcome Guest Search | Active Topics | Sign In | Register

RenderAsPDF method generates an incomplete PDF Options
Sjostrom
Posted: Friday, August 9, 2013 4:09:30 AM

Rank: Newbie
Groups: Member

Joined: 7/9/2012
Posts: 3
I am using the following Essential Objects assemblies in my asp.net web application.
EO.Pdf.dll 4.0.23.2
EO.Web.dll 10.0.28.2

I have an existing Web Form that displays text and images from a database. I added ASPXToPDF control to the web form and the following method to the corresponding code page.

Code: C#
Button_Click(object sender, EventArgs e)
{
    EO.Pdf.Runtime.AddLicense(sb.ToString());
    ASPXToPDF1.RenderAsPDF(_FileNameString);
}


75% of the time, a PDF is correctly generated. It seems that when my site gets busy, the PDF that is generated excludes some images and text content that otherwise does exist in my page. My web form always (eventually) renders all data. How can I ensure that method, "RenderAsPDF" always renders what is in the page?

I love this product and thanks for any direction! Angel

eo_support
Posted: Friday, August 9, 2013 9:28:11 AM
Rank: Administration
Groups: Administration

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

You can try to increase HtmlToPdf.Options.MaxLoadWaitTime to see if it helps. Also the latest build optimized more to handle load issues, so you can try that and see if it resolves the problem for you. Note that you do need to upgrade your license in order to use the latest version.

Thanks!
Sjostrom
Posted: Friday, August 9, 2013 12:04:15 PM

Rank: Newbie
Groups: Member

Joined: 7/9/2012
Posts: 3
Code: C#
HtmlToPdf.Options.MaxLoadWaitTime = 4500;


Should this line be included in the Page_Load event handler?
Inside the button's event handler, where ASPXToPDF1.RenderAsPDF is actually used?
Elsewhere?

Looking for best practice on setting any HtmlToPdf.Options for the ASPXToPDF page control.
eo_support
Posted: Friday, August 9, 2013 12:30:03 PM
Rank: Administration
Groups: Administration

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

You can set it before RenderAsPDF is called.

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.