Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gnans opened this issue Apr 16, 2020 · 3 comments
Open

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

gnans opened this issue Apr 16, 2020 · 3 comments

Comments

@gnans
Copy link

gnans commented Apr 16, 2020

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

@cesarvr
Copy link
Owner

cesarvr commented Apr 16, 2020

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

@gnans
Copy link
Author

gnans commented Apr 17, 2020

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

@cesarvr
Copy link
Owner

cesarvr commented Apr 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants