Convert PDF's to JPG's - fails in Shortcuts

In my kid’s nursery they share images from the day in a form of diary. The images are added as downloads and thats fine, but sometimes (and I have no clue how) they manage to share the images as PDF’s, rather that images.

I’ve been trying to create a Shortcut shortcut that take the pdf as input, transforms it to jpg and save it to All Photos.

The action “Get images from input” “Convert image” (not entirely sure about the english name of the action since I run danish iOS) should accept PDF’s as input, according to the description. But it fails.

Any ideas as to how I can solve this?

The input pdf’s are not encrypted or anything, and opens up just fine on both iOS and macOS.

Try the convert image action instead.

@sylumer - actually I think I was too fast above since that is in fact the action I’ve tried (and not “Get images from input”).

Try this shortcut.

https://www.icloud.com/shortcuts/c7e627d9c56c4bbcbb70859c0b85506a

It combines your last 3 screenshots into a PDF, show it, then splits it into 3 images and shows you those.

If that works, then next find another PDF and run the same convert to images action on it. Make sure it is from a different source. Perhaps a small user manual downloaded online or conference agenda, etc.

If both of those work then you know it is something about the PDF. I would normally ask if you could share a copy to see if there was anything unusual. But given the content that’s not an option :slight_smile:

Assuming it is the PDF, the next thing I would try would be something like this:

My theory to try here is that the PDF can be read but not converted to images, so try splitting the PDF and converting each separate PDF page into an image. The idea is of course that when prompted you would enter the number of pages in the PDF and you would add a Quick Look or Save to Photos/Files at an appropriate point to suit your testing/processing.

Hope that helps.

1 Like

Thanks so much.

Unfortunately it does not compute. My guess would be that the pdf files are somehow corrupted or wrong MIME-type or something.

If I add a bunch of Quick Look actions throughout all the different test shortcuts I’ve made, it shows the image on my screen. But as soon I try to convert the pdf to an image, the shortcut is closed without warning.

Well the whole point of the tests I set out was to isolate if it was specific to the PDFs being generated. The issue could still be with Shortcuts, but it doesn’t appear to be something you can take further with the app.

I don’t think so either but I found a workaround: Send the pdf to Scanbot > Save to Photos

So Scanbots pdf2jpg engine appears to (not surprisingly, I guess) be better than Shortcuts’ :blush: