pdf-generator icon indicating copy to clipboard operation
pdf-generator copied to clipboard

Is there a way to decrease dpi to decrease pdf file size ?

Open gnans opened this issue 4 years ago • 3 comments

Right now there in this plugin i don't see a way to reduce the pdf file size. If we can decrease a dpi value then pdf will decrease or anyone has suggestions to reduce the pdf file size

gnans avatar Apr 16 '20 02:04 gnans

You can achieve something similar by controlling the viewport on the HTML you want to transform.

cesarvr avatar Apr 16 '20 07:04 cesarvr

Thanks for the reply. Right now i am using "viewport" like this

meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no

in my application. I am testing this plugin in ipad pro ios version 13.4 and the pdf i am creating has 28 pages which has file size in 2.4mb. I want to reduce it to below 1mb. How can i achieve this using viewport.

Please help me on this

gnans avatar Apr 17 '20 04:04 gnans

Sorry for the late response, I think the size depends on the kind of assets in the form of images your are embedding in the PDF.

If those pages contain images ?

  • consider reducing the images size using compression, or displaying a lower resolution version of the image before transforming can help.

Everything else in the PDF is usually postscript (like) language, that should be very light weight.

cesarvr avatar Apr 24 '20 11:04 cesarvr