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 PDFAsImage scaling and uses of FSImage.scale for immutability changes #442

Conversation

JamesScrase-PortSwigger
Copy link
Contributor

2ce6f9f#diff-d210bc82c50b9ada2d6d90ecc8bb3688eaa4df211c1dd891615590558b732759R65 seems to have broken scaling of <img> tags which reference .pdf files - ITextReplacedElementFactory wasn't updated to use the new return value.

This PR updates the remaining usages of FSImage.scale to use the returned FSImage instead of the existing object, and passes through the unscaled width and height to the new PDFAsImage in PDFAsImage.scale.

@asolntsev asolntsev added this to the 9.11.0 milestone Nov 12, 2024
@asolntsev asolntsev self-assigned this Nov 12, 2024
Copy link
Contributor

@asolntsev asolntsev left a comment

Choose a reason for hiding this comment

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

Wow! Thank you. My bad.
I had to annotate scale method with @CheckReturnValue and double-check all usages.

@JamesScrase-PortSwigger FlyingSaucer 9.11.0 has been released.

@asolntsev asolntsev added the bug label Nov 12, 2024
@asolntsev asolntsev merged commit c29c8ae into flyingsaucerproject:main Nov 12, 2024
4 checks passed
asolntsev added a commit that referenced this pull request Nov 12, 2024
asolntsev added a commit that referenced this pull request Nov 12, 2024
asolntsev added a commit that referenced this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants