7

I am looking for a program that can convert a PDF that has several pages into one single image where pages would be stacked vertically.

If possible:

  • lossless compression
  • configurable resolution
  • batch processing of PDF
  • free
  • working on Windows 7
  • option to stacked horizontally
  • select which pages we want to convert

E.g. the PDF http://www.alicebot.org/chatbots3/Eugene.pdf would be converted into the following image (smaller image courtesy of @JanDoggen :):

enter image description here

  • 3
    Is there a way to keep the big image local to softwarerecs, but link it and have a smaller summary image instead? It's a good question IMO, and better for having an image example, but I'm going to get some scroll-based RSI before I get to read the answers! – Neil Slater Jun 25 '14 at 13:25
  • There might be some ways, but I'm reluctant to manually do things that I believe the Stack Exchange platform should take care of and that people repeatedly asked for in meta :) – Franck Dernoncourt Jun 25 '14 at 13:51
3

Not quite perfect but I do have a pretty good option; PDFCreator - should be useable with any standard PDF opening and printing software (ie Adobe Acrobat, Foxit etc. etc.). Instructions below assume Adobe Acrobat but should be fairly portable.

  • lossless compression: Yes. Despite it's name PDFCreator can save as a whole ton of formats - such as PNG which is a lossless. Also can use JPEG at 100% quality etc.
  • configurable resolution: Yes. Per format (for most formats) in the program options.
  • batch processing of PDF: Not really - there is a COM Interface available but not a nice cmd line option. However it would probably be possible to set print options correctly from some PDF reader via command line.
  • free: Yes
  • working on Windows 7: Yes (any modern Windows).
  • option to stacked horizontally: Yes - Although this is through the print dialogue (see below).
  • select which pages we want to convert: Yes - Although this is through the print dialogue (see below).

Problems I can see:

  • Poor (or non-existant) support of command line - you may be able to figure out a way to use it but I don't know any off hand.
  • Have to manually calculate some things (possibly possible programatically but I don't have any pointers for that).
  • Maximum of 18 pages vertical (assuming 8.5"WX11"H) per page (maximum size of the paper (see step 6 below) is 200"X200").

Usage Instructions:

  1. Install PDFCreator
  2. Open PDF of interest. (instructions below here assume Adobe Acrobat but should be fairly portable)
  3. File->Print
  4. Select Printer->PDFCreator
  5. Properties->Advanced->Page Size->PostScript Custom Page Size
  6. Select the size you want - for example to do a an 18 page vertical X 1 page Horizontal layout select 8.5" X 198"
  7. Ok->Ok->Ok
  8. Under Page Size & Handling select multiple
  9. For pages per sheet: select custom -> 1 X 18
  10. Select Page Order -> Vertical
  11. Print
  12. wait... ... ...
  13. PDF Creator Dialogue: If you haven't already select any quality options for your desired format under options.
  14. click Save
  15. Select Filename and Format -> Save
  16. Done ... whew... Good thing this takes longer to write than do.
  • 1
    Thanks Nick for the detailed answer which I upvoted but found the 18-page limitation a bit annoying so I have it added alternative answer :) – Franck Dernoncourt Jun 25 '14 at 3:18
3

Step 1: Convert the PDF to Image Files, many programs allow it such as Adobe Acrobat Pro:

enter image description here

or simply in command line with ImageMagick:

convert -density 600 foo.pdf foo-%02d.jpg

(convert is part of ImageMagick).

Step 2: Concatenate several images into a single giant image: you can use ImageMagick (open source and cross-platform) and use the command (assuming that you exported the PDF to PNG images):

montage *.png -tile 1x -mode Concatenate out.jpg
  • -tile 1x: concatenate vertically (use -tile x1 for horizontal)
  • -mode Concatenate: concatenate without any white space between the images

More details on the montage program (part of ImageMagick) if interested.


ImageMagick useful commands:

  • you can resize the image (to approximately 2MB in this example) using:

    mogrify -define jpeg:extent=2048KB out.jpg

  • you can modify the dimension of a bunch of images using (to 30% in this example):

    mogrify -resize 30x30% *.png

Also note that JPEG/JFIF supports a maximum image size of 65535×65535 pixels, while the PNG specification doesn't appear to place any limits on the width and height of an image; these are 4 byte unsigned integers, which could be up to 4294967295 .

enter image description here

and if you are curious: Why does ImageMagick's montage limit the JPG output to 65500 instead of 65535?

1

While @FranckDernoncourt's answer about ImageMagick is correct, there is an even more easy-to-use command:

convert      \
   input.pdf \
  -append    \
   output.png

Use +append for horizontal (instead of vertical) appending.

0

Aostsoft PDF to Document Image Converter Pro can batch convert PDF to nearly any document, Word, Excel, PowerPoint, Text, RTF, Image, JPEG, BMP, PNG, GIF, TIFF, PSD, HTML, SWF etc. The conversion speed is extremely fast and the quality is very good. Aostsoft PDF to Document Image Converter Pro is able to accurately convert PDF files at high rate with preserving the original format, layout, text, pictures, graphics etc. of your PDF files. It is a standalone program which does not need Adobe Acrobat or other third-party controls support.

Total PDF Converter converts PDF to DOC, RTF, XLS, HTML, BMP, JPEG, GIF, WMF, EMF, PNG, EPS, PS, TIFF, TXT, CSV, and PDFin batch.

  • Thanks can it convert a PDF that has several pages into one single image? – Franck Dernoncourt Jan 21 '15 at 16:04
  • On their page it says: Supports to convert each page of PDF to one single image. I really don't know... – Davidenko Jan 21 '15 at 16:08
0

PhantomJS

Try using PhantomJS with rasterize.js script, Sample command-line:

phantomjs rasterize.js http://example.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.