Earlier quoted context omitted.
OK, that's a good point. I think the only reason was I looked at PDF.js and felt the quality was not so good, and then I tried ImageMagick and found it gave good quality, so I just went with that. Another reason is I made this to convert the PDF (or Word doc, XLS, etc) remotely without the file ever touching the user's device. So they couldn't be exposed to any exploits contained in the file or of the PDF engine (PDF…
That's a great point. I typically don't like using remote resources for stuff that I can do locally. But for iffy pdfs, it's a good tradeoff. Edit: Nice to see the PDF capability added :)
Show HN: Simple PDF to PNG Server
21–30 of 58 posts
Re: Show HN: Simple PDF to PNG Server
#22Earlier quoted context omitted.
OK, that's a good point. I think the only reason was I looked at PDF.js and felt the quality was not so good, and then I tried ImageMagick and found it gave good quality, so I just went with that. Another reason is I made this to convert the PDF (or Word doc, XLS, etc) remotely without the file ever touching the user's device. So they couldn't be exposed to any exploits contained in the file or of the PDF engine (PDF…
Wow, wasn't expecting such a well constructed counter argument.
Re: Show HN: Simple PDF to PNG Server
#23Re: Show HN: Simple PDF to PNG Server
#24Earlier quoted context omitted.
I mean you don't need to upload a PDF list of all your darkest secrets.
No but a mention this is happening serverside and you are actually copying the file to the server kind of notice or message would be correct imho
Not being snarky, but the submission title does say "Server".
Re: Show HN: Simple PDF to PNG Server
#25With superb open source, cross platform libraries like pdfium available to the public, why won't I just do this on the client?
OK, that's a good point. I think the only reason was I looked at PDF.js and felt the quality was not so good, and then I tried ImageMagick and found it gave good quality, so I just went with that. Another reason is I made this to convert the PDF (or Word doc, XLS, etc) remotely without the file ever touching the user's device. So they couldn't be exposed to any exploits contained in the file or of the PDF engine (PDF…
This made me think that the site accepts a URL to a PDF/XLS/DOC file and returns PNG.
Re: Show HN: Simple PDF to PNG Server
#26Actually it just uses ImageMagick and soffice under the hood, so it can do way more than PDF. I've tested it with DOC, DOCX, XLS, and they all seem to work. Edit: in case anyone wants an example, here's the conversion of tesla-model-s.pdf[0]: https://secureview.cloudbrowser.xyz/uploads/filekat9.v05lnle... [0]: https://www.tesla.com/sites/default/files/tesla-model-s.pdf
Re: Show HN: Simple PDF to PNG Server
#27Does this use ghostscript? Was looking into doing this a while back but wasn't sure if I'd have to get a license from Artifex to use it in a SaaS app.
[0]: https://www.gnu.org/licenses/agpl-3.0.en.html
[1]: https://tldrlegal.com/license/gnu-affero-general-public-lice...
Re: Show HN: Simple PDF to PNG Server
#28Actually it just uses ImageMagick and soffice under the hood, so it can do way more than PDF. I've tested it with DOC, DOCX, XLS, and they all seem to work. Edit: in case anyone wants an example, here's the conversion of tesla-model-s.pdf[0]: https://secureview.cloudbrowser.xyz/uploads/filekat9.v05lnle... [0]: https://www.tesla.com/sites/default/files/tesla-model-s.pdf
what's your experience running soffice server-side? I might have to do this soon, and I'm dreading it.
The `convert` script of ImageMagick calls soffice by default if the input file is a LibreOffice type.
I actually started writing a shell script to detect if it was DOCX etc, and run soffice first, but then I found out that ImageMagick does that automatically, if libreoffice is installed.
Re: Show HN: Simple PDF to PNG Server
#29Actually it just uses ImageMagick and soffice under the hood, so it can do way more than PDF. I've tested it with DOC, DOCX, XLS, and they all seem to work. Edit: in case anyone wants an example, here's the conversion of tesla-model-s.pdf[0]: https://secureview.cloudbrowser.xyz/uploads/filekat9.v05lnle... [0]: https://www.tesla.com/sites/default/files/tesla-model-s.pdf
Re: Show HN: Simple PDF to PNG Server
#30Earlier quoted context omitted.
what's your experience running soffice server-side? I might have to do this soon, and I'm dreading it.
My experience is relatively small. The `convert` script of ImageMagick calls soffice by default if the input file is a LibreOffice type. I actually started writing a shell script to detect if it was DOCX etc, and run soffice first, but then I found out that ImageMagick does that automatically, if libreoffice is installed.
Be interesting to see how your demo site holds up under HN front page traffic - I know Imagemagic is used a lot for random web sites, but I worry about scale a lot. Any info would be useful!