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

fix: Return page width and height from document #700

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

vitormattos
Copy link
Contributor

@vitormattos vitormattos commented Apr 5, 2024

Type of pull request

  • Bug fix (involves code and configuration changes)
  • New feature (involves code and configuration changes)
  • Documentation update
  • Something else

About

Some documents could have pages without MediaBox, at this case we need to get the MediaBox from document and not from a specific page.

@vitormattos vitormattos changed the title fix: Return page with and height from document fix: Return page width and height from document Apr 5, 2024
Some documents could have pages without MediaBox, at this case we need
to get the MediaBox from document and not from a specific page.

Signed-off-by: Vitor Mattos <[email protected]>
Prevent the follow error:

```
ERROR: InvalidPassByReference - Parameter 1 of reset expects a variable (see https://psalm.dev/102)
				$details = reset($pdf->getObjectsByType('Pages'))->getHeader()->getDetails();
```

Signed-off-by: Vitor Mattos <[email protected]>
@k00ni
Copy link
Collaborator

k00ni commented Apr 9, 2024

Thank you, good addition to the documentation @vitormattos

doc/Usage.md Outdated Show resolved Hide resolved
Co-authored-by: Konrad Abicht <[email protected]>
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.

👍

@k00ni k00ni merged commit e13c495 into smalot:master Apr 9, 2024
29 checks passed
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.

2 participants