vokal / vip

Vokal Image Proxy is a lightweight image proxy designed for easy resizing and caching of images for mobile applications.
MIT License
2 stars 7 forks source link

Supporting PDF files #95

Open foresmac opened 9 years ago

foresmac commented 9 years ago

Basically there is no Go library to render an PDF into a bitmap. Right now the best solution is Datalogics web-based API: https://api.datalogics-cloud.com/docs#renderpages

However, the developer of gofpdf is considering making a Go wrapper around Google's PDFium (used by Chrome to render PDFs in the browser, for instance). That is an open source implementation of Foxit's FPDF SDK in C++; which confusingly isn't the same as the open source FPDF library to generate PDF files; it cannot render or display them. He will alert us if he starts down that path. If we decide to do this on our own, I suggest open sourcing the blimp rendering bit and alerting him in kind. He may include the functionality as part of gofdpdf.

scottferg commented 9 years ago

Why does vip need to support this?

foresmac commented 9 years ago

VIP doesn't, per se. But a theoretical "Vokal Media Proxy" might need it. I just wanted a place to pin this for future use.

jrit commented 9 years ago

@foresmac were the memory leaks with Ghostscript ever resolvable? I do think that other than that, it was a good way of dealing with PDFs.

foresmac commented 9 years ago

Well, it's never been a problem in production, but I don't know if I solved it by moving to a machine with a bunch more RAM or if no one is uploading PDFs.