Optimize ABCpdf file size

余生长醉 提交于 2020-01-04 14:16:13

问题


We've got a web system that generates dynamic pdf files with ABCpdf. While it works... okay, the file sizes are a little large.

For example, this morning as a test I generated a 140+ page file with lots of little graphics (actually, the same six little images repeated over and over.) The total file size was 12 megs and change.

Taking that file, opening it in Acrobat Pro and running it through the default optimization settings got me a 600k file.

Does anyone have any suggestions for getting the original file a little closer to that second number?


回答1:


This is almost guaranteed to be an image compression issue.

PixMap provides JPEG compression of underlying images. It's possible to actually have the software uncompress JPEGs that you've inserted and have it store as a Bitmap, and that would easily bloat the size.

Also ensure that your sizing is correct - don't include a 1600x1200 image and have it show in a tiny 2" frame - you can resize/scale it down in that case.




回答2:


Have you tried the latest version of ABCpdf? You should find this particular issue has been fixed ;-)




回答3:


ABCpdf appears to have many options for embedding images. Which did you use? What size are your images? What format? How many per page?

You may have some luck making your images smaller, either lower resolution or a better compression format (i.e. JPEG).




回答4:


It sounds like ABCpdf may be repeating the images rather than inserting each of them once into the PDF and referencing them. You could try CosEdit to see if that is the case. If it is you will get a lot of stream objects, whereas optimised output would have lots of references to the same few stream objects.




回答5:


You could also try running pdf compression over the top of the new files, if you cant get the abcPdf settings right.

See pdftk compression option for how to do this in c#.



来源:https://stackoverflow.com/questions/608724/optimize-abcpdf-file-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!