Feature request: set DPI #157

Closed
opened 2023-03-05 20:33:31 +00:00 by soheday · 4 comments

I have some images, which have no DPI set. I am currently using third party tools to set DPI to those images (no reencoding is required) before converting them to PDF. It would be very handy to be able to set DPI within img2pdf, either separately - for each image, or globally – for all.

I have some images, which have no DPI set. I am currently using third party tools to set DPI to those images (no reencoding is required) before converting them to PDF. It would be very handy to be able to set DPI within img2pdf, either separately - for each image, or globally – for all.
Contributor

Does the option --imgsize / -s help you? Quoting the help (formatting mine):

-s LxL, --imgsize LxL  Sets the size of the images on the PDF pages. In addition, the unit dpi is allowed which will set the image size as a value of dots per inch. Instead of a unit, width and height values may also have a percentage sign appended, indicating a resize of the image by that percentage. The short-option is the lower case s because it is an mnemonic for being smaller than the page size.
Does the option `--imgsize` / `-s` help you? Quoting the help (formatting mine): ```txt -s LxL, --imgsize LxL Sets the size of the images on the PDF pages. In addition, the unit dpi is allowed which will set the image size as a value of dots per inch. Instead of a unit, width and height values may also have a percentage sign appended, indicating a resize of the image by that percentage. The short-option is the lower case s because it is an mnemonic for being smaller than the page size. ```
Author

Thank you! I have missed that. Can you set DPI for each image separately?

Thank you! I have missed that. Can you set DPI for each image separately?

Thank you! I have missed that. Can you set DPI for each image separately?

No, but you can create a PDF file for each image, and combine them with pdfunite (poppler-utils).

> Thank you! I have missed that. Can you set DPI for each image separately? No, but you can create a PDF file for each image, and combine them with pdfunite (poppler-utils).
Owner

I'm using pdftk to merge multiple PDF files which, in contrast to pdfunite, has the advantage that it is also able to only pick certain pages from each input PDF file instead of just concatenating the whole thing.

pdftk in1.pdf in2.pdf cat output out.pdf

This issue can be closed, right?

I'm using pdftk to merge multiple PDF files which, in contrast to pdfunite, has the advantage that it is also able to only pick certain pages from each input PDF file instead of just concatenating the whole thing. pdftk in1.pdf in2.pdf cat output out.pdf This issue can be closed, right?
josch closed this issue 2023-06-09 04:58:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 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#157
No description provided.