Menu

#382 Add support for importing PPM.

5.X
open
nobody
None
5.6.1
Support
Medium
N/A
2017-12-07
2017-12-06
Tony Jones
No

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.

Discussion

  • Ben Olden-Cooligan

    Can you use the PNG format instead of PPM?

     
    • Tony Jones

      Tony Jones - 2017-12-07

      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".

       
  • Ben Olden-Cooligan

    Does the -png option work?

     
    • Tony Jones

      Tony Jones - 2017-12-07

      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)

       
  • Ben Olden-Cooligan

     
    • Tony Jones

      Tony Jones - 2017-12-07

      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::

      pdfimages -h
      pdfimages version 3.04
      Copyright 1996-2014 Glyph & Cog, LLC

      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 :)

       

Log in to post a comment.