Welcome Guest Search | Active Topics | Sign In | Register

Tips for optimizing HTML to PDF conversion Options
Matt
Posted: Thursday, March 6, 2014 9:59:58 AM
Rank: Newbie
Groups: Member

Joined: 3/6/2014
Posts: 1
Hi,
I'm currently evaluating the EO.Pdf product. We're looking to create a large number of PDFs using EO.Pdf.HtmlToPdf.ConvertUrl() method. Users will be able to create reports on demand via a web application and we also have a program that will generate reports more in a batch mode.

I'm wondering if there are any tips to getting the best performance/speed out of this method. For example, are there any settings in HtmlToPdfOptions or other classes that will affect speed one way or the other? Any behind the scenes debugging/logging that can be disabled?

Also, the evaluation version stamps each page of the pdf with "Created with EO.Pdf..." -- does this have any significant effect on speed? I don't think it would, but I saw in some other post on the forum that it might affect speed related to merging or something other library.

Thanks for your help.
Matt
eo_support
Posted: Thursday, March 6, 2014 10:18:18 AM
Rank: Administration
Groups: Administration

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

There are two cases that can causes slow conversion. One is during the loading, another is during the conversion. Our conversion waits for everything to finish loading before starts conversion, so for most cases it spends more time waiting for the page to load rather than for the conversion. Sometimes a small image in your page that loads slow and it has no visible impact on the whole page when you open it in the browser, but would have a significant impact on the converter since it waits for everything to finish loading first. As such the first thing to try to comment out the contents of page block by block to see if you can spot any of these performance kills.

On the conversion side there isn't much you can do as to the performance. Neither the debug output, not the license message stamped on each page has much impact on the performance. So if the performance is not idea, you might want to do it in a background task instead of while you are interacting with the user.

Merging is usually for a different scenario. If your HTML file is too big and failed to convert through one conversion (for example, if you are getting OutOfMemoryException), then you can split your HTML into multiple chunks and convert each chunk separately. After that you can merge them into a single big PDF file.

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.