Add support for importing PPM.
Scan documents to PDF and other file types, as simply as possible.
Brought to you by:
ben-cyanfish
It would be nice if NAPS2 could import PPM files as well as JPG files. While conversion to JPG is possible it is lossy.
pdfimages is able to extract PPM files from a PDF that NAPS2 sometimes has issues directly importing so allowing PPM import would solve these issues plus allow flexibility in other use cases.
Can you use the PNG format instead of PPM?
Possible as I guess PNG is lossless compression. I have no idea if the actual image stored in the PDF is PPM, or if pdfimages is performing a conversion but by default it saves as PPM so it would be nice if NAPS2 could handle it..The only other option is 'JPG' if you specify -j and if the PDF image is a "JPG image".
Does the -png option work?
Doesn't exist in the Windows version.
If it's not a useful addition, then ignore. I can always use imagemagick to convert to PNG (magick mogrify -format png *.ppm)
I'm just looking at https://www.systutorials.com/docs/linux/man/1-pdfimages/
Odd as the above tutorial reports version 3.03 and what I'm running on Windows is 3.04 but does not have the -png option::
On my openSUSE Linux system I get:
$ pdfimages -h
pdfimages version 0.56.0
Copyright 2005-2017 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
So that's probably a fork.
I found a version of poppler here: http://blog.alivate.com.au/poppler-windows/ which includes 0.51.0 which has the -png option.
So I guess I'll just use this version :)