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

Adding PDF optimizing #141

Open
GantMan opened this issue Oct 18, 2016 · 2 comments
Open

Adding PDF optimizing #141

GantMan opened this issue Oct 18, 2016 · 2 comments

Comments

@GantMan
Copy link

GantMan commented Oct 18, 2016

I had written an optimizer a while ago, much like image_optim. I love it!

One thing we added was PDF optimizations using qpdf. Perhaps that can get added to image_optim? I don't currently have the time, otherwise I'd add it myself.

qpdf --linearize "#{file}" "#{new_file}"

Thoughts?

@toy
Copy link
Owner

toy commented Oct 18, 2016

Thanks, Gant.

I already had a though about adding pdf optimisation and my main thoughts about this were something like:
Pdf is a document format, even if part of pdf documents are just wrapping an image, so should an image optimiser take care of pdfs?
And will not it lead to more non strictly image formats been optimised by image_optim.

But from current perspective - image_optim already handles svg format using svgo, and even if by definition it is an image format, it can contain text, so partially a document.
So maybe yes, especially if images inside pdf can be optimised, but than this requires a investigation of possibilities and complexity.

@GantMan
Copy link
Author

GantMan commented Oct 19, 2016

Take a playground round with qpdf. I had good results with it. Not sure what other tools are out there. But yeah, image_optim might need to become part of a toolset called assets_optim or something :)

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