Multiple images per page? #198
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Have you considered a feature that arranges multiple images per page? I.e. instead of arranging each image on a single page, it could be possible to specify a layout like "3x3" or "4x2" to get 9 or 8 images per page, respectively, laid out as specified in the center of the page.
This is work that could be done outside
img2pdf
, potentially lossily and/or with extra overhead, e.g. with something like ImageMagick'smontage
tool or printing to a print-to-PDF printer in n-up mode; however, sinceimg2pdf
already deals with efficiently and losslessly creating PDFs, I thought it may be a good fit.Considered, yes. But then also discarded the idea.
The img2pdf tool is already complex enough in the layouting it can do. Instead of having one tool that can do everything (think imagemagick) I'd rather have multiple tools that specialize in a given task.
If you browse the issues, you can find a number of them asking for support of a photoalbum mode, or adding text under the images, or adding support for custom image positions, or adding support for different layouter modes and so on and so forth...
If it comes to layouting, you are probably much better served by using something like LaTeX which gives you lossless conversion from input PDF (or images) to output PDF as well and additionally allows the user to create any custom format they want. The img2pdf tool is not trying to compete with that. You can probably imagine that once a photoalbum mode is added (essentially what you are requesting) there are going to be more feature requests coming. I am only developing this tool in my free time and I have nowhere near the time necessary to maintain a beast that is able to handle such complex output.
If you think that this feature belongs to img2pdf, please feel free to fork my code and implement it. I would even be more happy if you completely take over img2pdf maintainership because then I can use my free time for other projects.
Coming back to my original points of having each tool to do one thing and have it do that one thing well: there exists other software which is able to take multiple input PDF document/pages and will arrange those as multiple input pages per output page. For example this one:
https://manpages.debian.org/bookworm/texlive-extra-utils/pdfxup.1.en.html
My apologies, I did not realize this was such a pressure point. I had only checked the closed issues going back two years and not noticed any layout-related ones. I suppose I should have gone further back.
I understand your reasoning. Thank you for the good work on img2pdf, I appreciate it and will look into other tools for my other tasks.