Feature request: set DPI #157

Closed
opened 1 year ago by soheday · 4 comments
soheday commented 1 year ago

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.

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. ```
soheday commented 1 year ago
Poster

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 10 months ago
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
Loading…
There is no content yet.