reduce DOMPDF generated file size

本秂侑毒 提交于 2019-12-23 19:03:30

问题


iam using dompdf to generate pdf file from html , the problem is the generated filesize is big ,i.e. 1MB for 1 page of pdf ! is there any way to reduce it ?


回答1:


fonts and images are the primary size issue, use the internal fonts, so you don't have to embed them, and make sure any images are optimised.

PDFs include support by default for Helvetica, Times-Roman, Courier and Zapf-Dingbats. You do not need to install any font files if you wish to use these fonts. This has the advantage of reducing the size of the resulting PDF, because additional fonts must be embedded in the PDF. http://code.google.com/p/dompdf/wiki/Installation



来源:https://stackoverflow.com/questions/8793828/reduce-dompdf-generated-file-size

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