Live data from Hacker News

Show HN: Simple PDF to PNG Server

secureview.cloudbrowser.xyz

21–30 of 58 posts

Re: Show HN: Simple PDF to PNG Server

#21
post #18

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 :)

Thanks, I remember you commented on my first share of the remote browser thing :)

Re: Show HN: Simple PDF to PNG Server

#22
post #19

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…

Wow, wasn't expecting such a well constructed counter argument.

Thank you. The internet, eh? You never know what you're gonna get.

Re: Show HN: Simple PDF to PNG Server

#24

Earlier 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

> [...] mention this is happening serverside

Not being snarky, but the submission title does say "Server".

Re: Show HN: Simple PDF to PNG Server

#25
post #11

With 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…

"to convert the PDF (or Word doc, XLS, etc) remotely without the file ever touching the user's device"

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

#26

Actually 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.

Re: Show HN: Simple PDF to PNG Server

#27
post #23

Does 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.

The `gs` I have installed says it is licensed with this[0][1] so I think it's fine.

[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

#28

Actually 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.

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.

Re: Show HN: Simple PDF to PNG Server

#29

Actually 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

Does it support SVG?

Re: Show HN: Simple PDF to PNG Server

#30

Earlier 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.

hmm, OK, I didn't know that. Thanks that's useful :)

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!

Post reply on HN