Multiple images per page? #198

Closed
opened 2024-06-15 00:59:16 +00:00 by jf · 2 comments

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's montage tool or printing to a print-to-PDF printer in n-up mode; however, since img2pdf already deals with efficiently and losslessly creating PDFs, I thought it may be a good fit.

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's `montage` tool or printing to a print-to-PDF printer in n-up mode; however, since `img2pdf` already deals with efficiently and losslessly creating PDFs, I thought it may be a good fit.
Owner

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

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
Author

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.

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.
jf closed this issue 2024-06-16 01:57:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#198
No description provided.