Is there a software, that allows the user to take a folder of images and put them, in the correct order of their name, into a PDF, with dimensions A4? The images do not have A4 dimensions, they are more sized like paragraphs, since they are lemmas exported from another PDF.

Therefore it would also be good, if all images are above/below one another.

When dropping the images into Word, their order is mixed up, and other software I know only creates one "page" per image.

3 Answers 3


A home rolled solution using Python 3.8 & ReportLab (with thanks to Michael Driscoll for his book ReportLab: PDF Processing with Python which I referred to to do this):

Once you have python installed, if it isn't already, pip install pillow reportlab to get the required libraries then, in a python shell or a script:

import glob
from reportlab.lib.pagesizes import A4
from reportlab.lib import utils
from reportlab.platypus import Image, SimpleDocTemplate, Spacer

filelist = glob.glob("*.jpg") # Get a list of files in the current directory
doc = SimpleDocTemplate("output_rl.pdf", pagesize=A4)
story = []
for fn in filelist:
    img = utils.ImageReader(fn)
    img_width, img_height = img.getSize()
    aspect = img_height / float(img_width)

    img = Image(fn, width=550, height=(550*aspect))
    space = Spacer(width=0, height=5)

Note that this has only been tested with jpeg files but according the ReportLab User-guide since pillow is installed other formats can be handled. The scaling may need to be more sophisticated for your use.

  • Price: Free
  • OS: Many
  • 1
    I have uploaded an extended version, that automatically crops away white borders, to my GitHub, such that the resulting PDF is as uniform as possible. Furthermore, the Margins have been decreased, as well as page numbers added. Commented Dec 14, 2019 at 20:22
  • @RomanStadler - Glad you found it useful. Commented Dec 15, 2019 at 6:54

Imagemagick can do this for you with a command such as:

magick convert image1.jpg image2.png image3.bmp output.pdf 

You will have to dig into the documentation a bit to find out how to specify things like the page size but you can also specify the size of each image, etc.

Imagemagick is:

  • Free, gratis & opensource
  • Cross Platform
  • Very Powerful
  • Ok so far I could only find the command "magick montage mhk -mode concatenate -tile 1x out.pdf", but this creates a single pdf with all the pages in the right place, is there a way to break the pages after A4 is reached? Commented Dec 9, 2019 at 20:25
  • @RomanStadler try adding -page a4 to the command just before output. Commented Dec 9, 2019 at 20:43
  • With "magick montage *.png -page a4 -mode concatenate -page a4 -tile 1x out.pdf", it puts the whole, long continuous pdf to the left of an A4 page, I have tried the -page a4 option at various positions in the command, no difference Commented Dec 9, 2019 at 20:48

From what I understand, you need to convert a whole folder of images into PDF, organize it and turn it into a4 sizes. This can all be done easily using online PDF editors and converters. Try DeftPDF's JPEG to PDF tool. You can upload as many images as you like and organize it by drag and drop. Once organized, select the preferred page size, orientation, and margins to match what you need. Further instructions and sample can be found here: How to convert one or multiple images into a PDF

Full disclosure: We're the developer of the tool we recommend and we think it can help you, hence the recommendation. We would be happy to see you try it to help you and you can send a message/comment if there's further assistance needed.

  • 1
    Welcome DeftPDF! Your answer has been flagged multiple times as spam because you have not fully disclosed your affiliation with the product you are recommending. Please add a full disclosure to your answer right away. Thanks! Commented Dec 24, 2019 at 11:25
  • 1
    hello RockPaperLizard, thank you for notifying me. I've already updated my answer with the disclosure of affiliation. I hope this is sufficient.
    – DeftPDF
    Commented Dec 28, 2019 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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