开发者

Html to PDF conversion taking long time with the ExpertPDF/Aspose.Pdf components

开发者 https://www.devze.com 2023-04-12 02:38 出处:网络
I am trying to generate a PDF file based on a dynamically generated HTML report that our webapplication has generated.

I am trying to generate a PDF file based on a dynamically generated HTML report that our webapplication has generated.

The HTML generation and rendering is fast (1-4s) except in older browsers (IE6/IE7), but when I use either one of the mentioned PDF components to generate th开发者_如何学运维e PDF version, it can take up to several minutes.

For instance I have an HTML report that contains only text - approximately 1 million characters - which takes ~28s to convert to a PDF file, which is only 1.15MB in size and ~250 pages.

Is there any way to optimize the HTML, to make the job easier for the PDF components?


I think you need to check below component for you question..

They give online demo for checking conversion....

http://www.essentialobjects.com/Products/EOPdf/Default.aspx

http://www.winnovative-software.com/

For Ref: Check out this page answer and it's comments...

Convert HTML to PDF in .NET


It would be better if you could share a sample input HTML file along with the code snippet. Moreover, we have recently published a newer version of Aspose.Pdf for .NET (version 6.3.0). Please try with that and see if it helps in your scenario. If you still find the same issue then I would recommend you to post the query along with input HTML and code snippet in Aspose.Pdf forum. Our support team will further investigate it and guide you accordingly.

Disclosure: I work as developer evangelist at Aspose.


Better try to avoid HTML --> PDF conversion if you can - it makes lots of problems sometimes.

I've tried two other approaches (both are free of charge) and both are working very well, although are much different:

  • Use Microsoft Reporting RDLC templates. Has nice and easy designer in Visual Studio. What you have to do is just to create a template, fill it with some data in code and that's all. It's fast, easy to use and maintain. I'm currently using that in many webapps and I'm very happy with it.
  • Use iTextSharp library. It blazingly fast. You can generate PDFs from XML or from code (which can be a drawback in complex PDFs, but gives you full control if you need it).


You can try XF Rendering Engine from Ecrion Software(www.ecrion.com). They have also a WYSIWYG designer.

Thanks


  1. First what i did to improve performance of conversion is to convert my report html in box structure with the help of designer
  2. I used this component Winnovative HTML to PDF Converter


I have used in many projects, its faster and stable. Try follwoing
http://code.google.com/p/dompdf/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号