Photoalbum mode #81

Closed
opened 2021-04-25 19:58:50 +00:00 by josch · 1 comment
Owner

By Thomas on 2020-06-30T19:47:24.306Z

I have tried to use img2pdf for my project because I really like its features. What I have done is to scan a photo album. For several reasons, I have now not only right and left pages but also every page has a different size (pixels: WxL) but is supposed to have the same geometry (cm: WxL) so they have all different resolution (dpi).

What I would like to do now is to compile all the images (one page each) into one pdf such that the images of the left pages are right aligned and the right images left-aligned (not centered) and centered in vertical direction.

Additionally, it would be great if img2pdf would find the page with the maximum or minimum (geometrical) size and use this as a reference for pagesize, so that the final album has the same page size for all pages without me having to find the right value.

The album pages have been scanned on a black background. It would therefore be ideal if there were an option to set the background color.


By josch on 2020-06-30T20:10:06.984Z


Thank you for your interest in img2pdf! Unfortunately I think your request is just too specific. Think about it: how many other people will be in a similar situation as you are -- can you say with confidence, that your use-case is common enough such that it is worth the additional complexity of img2pdf?

Lets go through your wish-list one-by-one:

You would like to have a facility which allows one to align images on the left or right. How would this look like such that the functionality is general enough to not only be useful in your case but in the general case? You would have to include a few additional command line options and probably some sort of layout language which allows you to define rules like "align like this on even numbered pages" and "align like that on odd numbered pages". I think you are better served by whipping up a quick LaTeX document where you use the right document class to achieve your desired layout. (LaTeX is also lossless for the jpeg images you embed)

You also would like to set a background color. For how many people would that be useful? It is not useful for archival purposes because the background color is irrelevant for reading on the screen. It is undesirable for printing the result because it would waste a lot of ink to print a non-white background color. But lets say you add an option. Next time somebody comes and says "but for my use case, I need color X on pages 1-5 and color Y on pages 6 to 10" -- so yet another option for that?

The more features you add the harder it becomes to use a tool because more documentation has to be added. More documentation means that the tool is harder to understand. Apparently the existing documentation is already hard enough to understand that you didn't see that one of your feature requests is already possible today -- which proves my point.

So what you have to convince me of is: what you request a common enough use-case such that it's worth implementing it? Or is what you want just specific to what you personally want?


By Thomas on 2020-06-30T21:29:17.365Z


I thnk you are wrong. Setting the alignment of the image ("x cm from the left", "centered vertically") is a common use case. I don't need you to add any "align like that on odd numbered pages", I can fairly join the pdf paged afterwards with pdfjam, but I can not move the images around easily (particularly not lossless).

On the background color: Just search google for how many forum entries they are asking for that.

I program myself. I seriously doubt that in a well designed progra, it adds ANY complexity to add another option that outputs a single additional statement into the pdf file. There is nothing more trivial than that. And again: I can join the pdf files afterwards.

Sure I can setup LaTeX documents... but is it fairly easier to process my stuff with a bash script than creating almost a hundred LaTeX documents manually or automatically. I wonder what the use case of img2pdf is then at all ... it might be generally quicker and more flexible to just comiule a LaTeX document. Maybe you should add some instructions for that on your page.


By josch on 2020-06-30T21:41:08.649Z


Cool! It seems we have found ourselves a volunteer to implement the missing features. :)

My advice to move forward is the following: split your feature requests into individual issues so that we can tackle each of them by itself without conflating all of them into a big mess. Then open a merge request that implements the functionality you want. Remember that any new feature needs documentation and test cases.

Same goes for any possible recipe like instructions for how to combine the output with LaTeX. We can easily add that to the README.md or create wiki pages in this gitlab instance -- again, just open a merge request about it.

Thanks!


By josch on 2020-08-04T07:00:34.417Z


Hi @rtlprmft -- did you find some time to work on the missing features you listed? I'm about to make a new release and was wondering whether you had some contributions already or not. Thanks!

*By Thomas on 2020-06-30T19:47:24.306Z* I have tried to use img2pdf for my project because I really like its features. What I have done is to scan a photo album. For several reasons, I have now not only right and left pages but also every page has a different size (pixels: WxL) but is supposed to have the same geometry (cm: WxL) so they have all different resolution (dpi). What I would like to do now is to compile all the images (one page each) into one pdf such that the images of the left pages are right aligned and the right images left-aligned (not centered) and centered in vertical direction. Additionally, it would be great if img2pdf would find the page with the maximum or minimum (geometrical) size and use this as a reference for pagesize, so that the final album has the same page size for all pages without me having to find the right value. The album pages have been scanned on a black background. It would therefore be ideal if there were an option to set the background color. --- *By josch on 2020-06-30T20:10:06.984Z* --- Thank you for your interest in img2pdf! Unfortunately I think your request is just too specific. Think about it: how many other people will be in a similar situation as you are -- can you say with confidence, that your use-case is common enough such that it is worth the additional complexity of img2pdf? Lets go through your wish-list one-by-one: You would like to have a facility which allows one to align images on the left or right. How would this look like such that the functionality is general enough to not only be useful in your case but in the general case? You would have to include a few additional command line options and probably some sort of layout language which allows you to define rules like "align like this on even numbered pages" and "align like that on odd numbered pages". I think you are better served by whipping up a quick LaTeX document where you use the right document class to achieve your desired layout. (LaTeX is also lossless for the jpeg images you embed) You also would like to set a background color. For how many people would that be useful? It is not useful for archival purposes because the background color is irrelevant for reading on the screen. It is undesirable for printing the result because it would waste a lot of ink to print a non-white background color. But lets say you add an option. Next time somebody comes and says "but for my use case, I need color X on pages 1-5 and color Y on pages 6 to 10" -- so yet another option for that? The more features you add the harder it becomes to use a tool because more documentation has to be added. More documentation means that the tool is harder to understand. Apparently the existing documentation is already hard enough to understand that you didn't see that one of your feature requests is already possible today -- which proves my point. So what you have to convince me of is: what you request a common enough use-case such that it's worth implementing it? Or is what you want just specific to what you personally want? --- *By Thomas on 2020-06-30T21:29:17.365Z* --- I thnk you are wrong. Setting the alignment of the image ("x cm from the left", "centered vertically") is a common use case. I don't need you to add any "align like that on odd numbered pages", I can fairly join the pdf paged afterwards with pdfjam, but I can not move the images around easily (particularly not lossless). On the background color: Just search google for how many forum entries they are asking for that. I program myself. I seriously doubt that in a well designed progra, it adds ANY complexity to add another option that outputs a single additional statement into the pdf file. There is nothing more trivial than that. And again: I can join the pdf files afterwards. Sure I can setup LaTeX documents... but is it fairly easier to process my stuff with a bash script than creating almost a hundred LaTeX documents manually or automatically. I wonder what the use case of img2pdf is then at all ... it might be generally quicker and more flexible to just comiule a LaTeX document. Maybe you should add some instructions for that on your page. --- *By josch on 2020-06-30T21:41:08.649Z* --- Cool! It seems we have found ourselves a volunteer to implement the missing features. :) My advice to move forward is the following: split your feature requests into individual issues so that we can tackle each of them by itself without conflating all of them into a big mess. Then open a merge request that implements the functionality you want. Remember that any new feature needs documentation and test cases. Same goes for any possible recipe like instructions for how to combine the output with LaTeX. We can easily add that to the `README.md` or create wiki pages in this gitlab instance -- again, just open a merge request about it. Thanks! --- *By josch on 2020-08-04T07:00:34.417Z* --- Hi @rtlprmft -- did you find some time to work on the missing features you listed? I'm about to make a new release and was wondering whether you had some contributions already or not. Thanks!
Author
Owner

Closing because of inactivity.

Closing because of inactivity.
josch closed this issue 2022-04-11 06:27:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#81
No description provided.