HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › pd4ml.render is taking too long time › Re: Re: pd4ml.render is taking too long time
Hello,
The css on our webpages are included as the css files. We are not using inline styling. We are generating the pdf file from pd4ml on the server where our web application exist (web pages + css + images etc). Therefore, its a less probability of any networking delays.
If we generate our webpages containing images but without CSS the performance is not that bad but with CSS its too slow. Like 139 pdf pages (with css styling, fonts and images ) are generated in approx. 80 secs. We have embed the fonts files in the jar file of our application.
Can you please answer the following questions:
The CSS that we are using is quite heavy (approx 4000 lines, 137KB size). Could heavy css size be the reason for slow performance?
If yes, does the css lines which are not used on the page also adds to the pdf generation time or time is only dependent on the how much css styling is applied on the page. In other words if only a section of css is getting applied on my pdf pages, does rendering of that particular section of css account for the generation time or whole css is parsed and rendered by pd4ml, does not matter if all the css is applied on html or not.
Is there any CSS or HTML tags/attributes/property which takes too much of time to render by pd4ml and we should avoid it to enhance the performance?
Any common tips that can imporve the performance of the overall pdf generation time.
Thanks