HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Image size reducing after rendering into PDF
- This topic has 6 replies, 2 voices, and was last updated May 08, 2017
17:43:58 byAnonymous.
-
AuthorPosts
-
May 4, 2017 at 19:16#27146
We are working on a project for which we are considering PD4ML as a potential library to generate PDF’s… however as part of our trails we experienced that when we are providing 2MB image files and rendering 160 page PDF with entirely those images, we are getting a file of size not more than 3MB, I believe the image files are being compressed and put into PDF.. we want the high-definition images to be taken as is into PDF and the file should be generated.
Can you confirm if there is a setting to avoid compression..
May 5, 2017 at 13:33#30040PD4ML never downsamples images. It embeds images “as is” (JPEGs, some species of PNG, Fax TIFFs) or converts them to lossless internal PDF image format.
If the same image appears on multiple pages, resulting PDF will include only one instance of the image, referenced from multiple places.
May 8, 2017 at 15:37#30041Is there any size limit on the PDF generation? we are expecting the PDF’s to be around 200MB~
May 8, 2017 at 15:40#30042There is no hardcoded limitations. The data volume PD4ML can process is only limited by JVM heap size.
May 8, 2017 at 16:10#30043I am going to use .Net Library of PD4ML… just wanted to know if there is any chance that we might run into out of memory while generating the last size pdf’s with high definition images
May 8, 2017 at 16:22#30044That depends on where the document volume comes from.
If the document is bulky because of bulky images – it ok. PD4ML can temporarily unload static resources to cache and read them again at PDF writing phase.
If it is bulky because of a lot of HTML content: it can be problematic. HTML rendering assumes a lot of overhead – even a single standalone whitespace is represented in RAM as a number of Java objects (content itself, HTML attributes, CSS properties, layout info etc). In the case RAM requirements can be too high.
An experimenting with eval version can help a lot to estimate the max doc volume for your particular case.
Also do not forget a possibility to split the the doc to multiple parts (it it is possible for your doc structure), to convert them separately and to finally merge to a single PDF doc from just generated pieces.
May 8, 2017 at 17:43 -
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
