[Question] How to predict the page size of the resulting document (in PDF units)? #97

Closed
opened 3 years ago by mara0004 · 5 comments

Is there a way to reliably predict the size of the resulting PDF page based on the image size?

Is there a way to reliably predict the size of the resulting PDF page based on the image size?
josch commented 3 years ago
Owner

By default (if --border or --pagesize and similar options are not used) the size of the page is equal to the size of the image, using the dpi value embedded in many image formats. If an image does not contain a dpi value in its metadata, then the default dpi value is 96. This is also all explained in the --help output. Can you point out where the current documentation is missing or unclear with respect to your question?

By default (if `--border` or `--pagesize` and similar options are not used) the size of the page is equal to the size of the image, using the dpi value embedded in many image formats. If an image does not contain a dpi value in its metadata, then the default dpi value is 96. This is also all explained in the `--help` output. Can you point out where the current documentation is missing or unclear with respect to your question?
Poster

Thanks for the explanation. Actually the documentation is pretty clear, I simply overlooked the relevant passage. Sorry.

Thanks for the explanation. Actually the documentation is pretty clear, I simply overlooked the relevant passage. Sorry.
mara0004 closed this issue 3 years ago
mara0004 changed title from [Question] How to predict the page size of the resulting PDF? to [Question] How to predict the page size of the resulting document (in PDF units)? 3 years ago
F04 commented 4 months ago

@josch How was 96 chosen?

@josch How was 96 chosen?
josch commented 4 months ago
Owner

Good question. I'm not entirely sure anymore! There are a couple of software packages that have 96 as the default dpi. Do you have a good argument for a different value?

Good question. I'm not entirely sure anymore! There are a couple of software packages that have 96 as the default dpi. Do you have a good argument for a different value?
F04 commented 4 months ago

I could be a wisecrack and recommend 42. 69, or 98.6. But instead I have a more radical, and I think, reasoned idea for your consideration...

#189

I could be a wisecrack and recommend 42. 69, or 98.6. But instead I have a more radical, and I think, reasoned idea for your consideration... https://gitlab.mister-muffin.de/josch/img2pdf/issues/189
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#97
Loading…
There is no content yet.