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

Add instructions to get page width and height #593

Merged

Conversation

vitormattos
Copy link
Contributor

Based on #427 (comment)

Close #427

Copy link
Collaborator

@k00ni k00ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vitormattos Thank you for this pull request. It is a helpful addition to our docs.

If I understand your example code correct, it extracts height and width of each page not for the whole PDF. You referenced #427, which is about the width and height of the whole PDF. Based on the PDF specification there is no width/height of a PDF, but for each page.

Please ignore the failing CS job. I saw it failing in another PR. PHP-CS-Fixer changed its behavior lately, but we didn't make the change in master.

doc/Usage.md Outdated Show resolved Hide resolved
@k00ni k00ni self-requested a review April 12, 2023 06:49
@vitormattos
Copy link
Contributor Author

Yes @k00ni , is exactly this.
Is possible to exist a PDF file with pages with different sizes.
I used this package at LibreSign and put on my PR the reference of all changes that I did to use this package. My PR at LibreSign was a bit big because I removed the dependency of a binary in Go that was created only to get the dimensions of all pages.

@vitormattos vitormattos force-pushed the feature/427/doc-to-get-width-and-height branch from aafc6a9 to b013ab1 Compare April 15, 2023 10:35
@vitormattos
Copy link
Contributor Author

rebased from master branch to make CI OK

@k00ni k00ni merged commit ced49b8 into smalot:master Apr 17, 2023
@vitormattos vitormattos deleted the feature/427/doc-to-get-width-and-height branch April 17, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to get the PDF width and height ?
2 participants