Author Topic: Mass converter for PDFs to images (not online)  (Read 372 times)

0 Members and 1 Guest are viewing this topic.

Offline Andrew Clunn

  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 15181
  • Aspiring Super Villain
Mass converter for PDFs to images (not online)
« on: February 23, 2017, 05:41:32 PM »
As every programmer can attest, sometimes you end up doing IT support because nobody else can debug exactly where the problem is.

The situation, a client is complaining that when they zoom in on the images associated with their items they are too pixelated (this occurs in a store front end I maintain, though I'm not the original coder).  I suspect that the issue is with the image itself and find out that client communications takes the images from the clients and uploads them to the server.  I talk to them and find out that this particular client sends them the images as PDFs, which client communication uses a free tool to convert en mass.  Of course this free tool has a 70% quality cap unless you pay for the full version.  Obvious solutions:

1 ) Pay for the tool...  Too expensive for management as each person in client communications would need their own license.

2 ) Use free online conversion tools...  Some information is sensitive, so this is a no go.

3 ) Write a quick python script to convert all the pdfs in a folder to...  These people are from client communications and have no idea what a command prompt even is.

4 ) Open each pdf individually in a viewer and...  Nope, they'll just use the process they're used to then because lazy.

5 ) Send the pdfs to graphics who already have an InDesign script to...  This should be client communications' job.

So I'm left with two viable options:

6 ) Create an in-house tool with a pleasant clickable front end to accomplish this task (like #3, but a pain in the ass because then I'm going to have to support it).

7 ) Have people send the pdfs to me, and I'll just run the god damn script.

8 ) Find some downloadable free alternative to the current pdf converter.

Gah, this is all my fault for actually wanting to solve the problem and investigating the real issue!
Banned from both Hacker News and the xkcd forum.

Offline stands2reason

  • Empiricist, Positivist, Militant Agnostic
  • Reef Tank Owner
  • *********
  • Posts: 9614
Re: Mass converter for PDFs to images (not online)
« Reply #1 on: February 26, 2017, 11:21:31 AM »
The ImageMagick image-processing suite can do this. Using its convert command, it can take a PDF file as input. By default, it creates one image per page.

Code: [Select]
$ convert doc.pdf doc.png
$ convert doc.pdf doc.jpg

I believe I have done exactly this before. I'm pretty sure you can arbitrarily set the DPI, because the default is pretty low.

This is a must-have. It is FOSS and available in Linux and Mac package managers, though I remember using it on Windows as well. I can't remember if it uses cygwin. They have a Python wrapper too, if that's your thing.

Offline Andrew Clunn

  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 15181
  • Aspiring Super Villain
Re: Mass converter for PDFs to images (not online)
« Reply #2 on: February 26, 2017, 11:35:39 AM »
Yeah, it's between that and ghost script for the underlying libraries to interface with.  Waiting on approval to actually build the thing
Banned from both Hacker News and the xkcd forum.

Offline The Latinist

  • Cyber Greasemonkey
  • Technical Administrator
  • Reef Tank Owner
  • *****
  • Posts: 9291
Re: Mass converter for PDFs to images (not online)
« Reply #3 on: February 26, 2017, 04:16:54 PM »
Aren't there about two dozen free PDF-to-image converters out there?  I don't know how good any of them are, but it seems like creating an in-house solution for this is a bit excessive.
I would like to propose...that...it is undesirable to believe in a proposition when there is no ground whatever for supposing it true. — Bertrand Russell

Offline Andrew Clunn

  • Poster of Extraordinary Magnitude
  • **********
  • Posts: 15181
  • Aspiring Super Villain
Re: Mass converter for PDFs to images (not online)
« Reply #4 on: February 26, 2017, 04:23:16 PM »
Aren't there about two dozen free PDF-to-image converters out there?  I don't know how good any of them are, but it seems like creating an in-house solution for this is a bit excessive.

If you know of one that:

1) Doesn't restrict the quality or put some watermark on the image.

2) Can do multiple puffs at once.

Then by all means, let me know.
Banned from both Hacker News and the xkcd forum.

 

personate-rain
personate-rain