Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dimensions for A4 #13

Closed
porjo opened this issue May 20, 2021 · 5 comments
Closed

Wrong dimensions for A4 #13

porjo opened this issue May 20, 2021 · 5 comments

Comments

@porjo
Copy link

porjo commented May 20, 2021

I converted this PDF to A4 tiles: github_sample.pdf

./pdftilecut -tile-size A4 -in github_sample.pdf -out github_sample_A4-2.pdf

output PDF: github_sample_A4-2.pdf

But the output seems to be not A4. Loading that PDF into Gimp produces images that are 737x885 pixels (I would expect 595x842)

@oxplot
Copy link
Owner

oxplot commented May 20, 2021

Your input's height is 6.86 inches. The output has 1 inch margin, so the height ends up being 8.86 inches. That's smaller than 11.6 inches of an A4, so that one's fine.

The width is not A4 because the size you specify isn't the output size, it's the "maximum output" size. And it's the size, including the margins.

The tiles are sized such that they all have the same size and they're all under the page size specified. Both of which are true in the output.

@oxplot oxplot closed this as completed May 20, 2021
@porjo
Copy link
Author

porjo commented May 20, 2021

What I had in mind is output like this (plus margins):

Screenshot from 2021-05-21 08-09-53

Instead I got this:
Screenshot from 2021-05-21 08-09-53_2

@oxplot
Copy link
Owner

oxplot commented May 21, 2021

Yep, as I explained in the other issue, to avoid having a final tile that's potentially 2mm wide (in your case) and unusable, the tile sizes are maximum, and not exact. pdftilecut then ensures that all tiles are the same size and under the maximum size specified.

@porjo
Copy link
Author

porjo commented May 21, 2021

What about the seemingly arbitrary page overlaps - that seems like a bug?

I'd prefer to have the final page 2mm wide and simply discard it. Could that behaviour be added as an option?

@oxplot
Copy link
Owner

oxplot commented May 21, 2021

What about the seemingly arbitrary page overlaps - that seems like a bug?

If after trimming the output pages and stitching them together, you don't get the original content, then that's a bug. Otherwise, the amount of overlap is not something that's guaranteed or otherwise important at all.

I'd prefer to have the final page 2mm wide and simply discard it. Could that behaviour be added as an option?

I have no use for this, but PRs are definitely welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants