Comments (9)
Hi John,
Thank you for letting me know about this. I will do it over the weekend.
from heroku-buildpack-vips.
Hi again, I spent some time fixing up that Dockerfile I made a while back:
https://github.com/jcupitt/docker-builds/tree/master/libvips-heroku18
It seems to all work. You end up with a 4MB tarball which runs on a bare heroku 18 image and supports most file formats, including PDF. If you drop PDF support, it goes down to 1.5MB.
Hopefully this can copy-paste in a pretty simple way into your build pack. It works with heroku 20 too, I've not tried any others.
from heroku-buildpack-vips.
Thanks for the update, John.
I'm wondering what the ramifications of switching from poppler to PDFium would be. I seem to remember that a long time ago I had some image "ghosting" issues and it was related to the PDF renderer that was being used. I remember it was the same engine that is used by Firefox. Would that be poppler or PDFium? I use the PDF capabilities of vips very heavily, so I am hesitant to make that change in the buildpack...
from heroku-buildpack-vips.
I found the issue here.
Are you aware of any differences in how PDF loading works between poppler and PDFium that I should be aware of? I'm still hesitant, but less so since the issue above involved poppler which the buildpack currently still uses.
from heroku-buildpack-vips.
Hi again, here's my understanding of the pros and cons:
- Robustness pdfium is the PDF reader that's built into Chrome, so it's extremely well tested and safe. Poppler is fuzzed too, but not to the same extent. The (maybe?) slight weak point is the libvips / pdfium link, since we don't fuzz that specific bit of code at the moment. I'll add it to the libvips fuzz package.
- Compliance Again, being Chrome's PDF reader means that pdfium ought to have excellent standards compliance. Though I don't actually know of any specific cases that pdfium handles better.
- Performance Pretty similar, both speed and memory use. You'll find some PDFs are faster with one and some faster with the other.
- Licence This is the largest difference: poppler is GPL3 and pdfium is MIT. All rails programs using the poppler buildpack are probably gpl3, maybe accidentally.
- Threading Poppler lets two threads render two separate PDFs at the same time, but pdfium is very, very single-threaded: only one thread may do any pdf rendering at any one time (this is because of its origins as the FoxIt Windows desktop PDF previewer and won't be fixed, unfortunately). I don't know if this has performance implications, it depends on the threading model used by rails.
In my opinion it's a change worth making for the robustness and the much more liberal licence, but it's certainly debatable and I can see people taking the opposite view.
from heroku-buildpack-vips.
I remember it was the same engine that is used by Firefox.
I think FF uses their own PDF previewer written in javascript. Chrome uses pdfium, derived from FoxIT, that they've open-sourced under the MIT licence. Poppler derives from the old Unix xpdf desktop previewer.
from heroku-buildpack-vips.
... adding pdfium to the libvips fuzzer: google/oss-fuzz#7336
from heroku-buildpack-vips.
Thank you again, John. I finally had time to get all of the open PRs taken care of, so this is my next item to handle.
from heroku-buildpack-vips.
This is finally done 👍
from heroku-buildpack-vips.
Related Issues (20)
- vips 8.9.2 HOT 3
- Support for libwebp and libheif HOT 14
- 500's after latest changes HOT 13
- VipsForeignLoad error converting PDF to PNG HOT 1
- Broken in heroku-20 HOT 2
- Vips::Error VipsForeignSave in gif images (not a known file format) HOT 17
- heroku vips wont build HOT 10
- PDFs not working unless I add `poppler-utils` to Aptfile HOT 1
- (mis)usage of heroku-buildpack-vips HOT 1
- Support for heroku-22 HOT 4
- AVIF not working out of the box HOT 2
- Heroku-22 support
- Thank you for maintaining this until now :) HOT 13
- Do we actually need an Aptfile for libglib2.0? HOT 2
- HEIF/HEIC support seems broken HOT 38
- Update to libvips 8.15.0
- Can't build sharp 0.32.6 with version 8.14.5
- Support for heroku-24 HOT 8
- Buildpack not compatible with heroku-24 stack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-vips.