PDF import support

I attempted to write in a PDF import using Wand for python, but it’s not great. Anyone know a good way to get pdf imports to work? Basically it made an image for every page, which is fine, but Wand seems a bit too heavy for the pi.

First, I would strongly discourage the use of PDFs. It’s a format designed for print, not digital displays. Thus the aspect ratios will be off.

That said, if you really want to display a PDF, you will need to first convert it to an image. I haven’t used Wand before, but it looks like just a wrapper around Image Magick, which is a sensible approach. Personally, I’d probably just use convert (from Image Magick) directly (ref) and then simply call on curl to upload it directly to the API. This can then be wrapped into Bash script that you can either run directly on the Pi (or somewhere else).

With regards to resource consumption, I wouldn’t be too worried about it unless you’re constantly adding new PDFs.