I need to process multi-page PDFs that are scanned in to me using a program I wrote in C++ using OpenCV libraries. OpenCV does not read in PDFs, so I am currently using pdftk
to break up the PDF, and convert -density 300 page##.pdf page##.png
to convert the individual pages to PNGs before reading them in with my program.
The issue is convert
takes about 30 seconds on my Raspberry Pi to do this conversion. Is there an easier way to convert multi-page PDFs in a way that can be read in my C++/OpenCV?