-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Scale page content #991
Scale page content #991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds neat! Thanks for working on it @JNK90 🙂
I appreciate you adding good doc comments as well. That's something a lot of folks seem to forget about, haha.
In addition to my change request, can you:
- Explain a bit more about how this works? Please include screenshots/examples.
- Update one or two integration tests to showcase this behavior.
@Hopding I have added integration tests for node and web (I have problems to run the other environments on my system). I also replaced .forEach() and .asArray() calls. To scale the content the method scaleContent(x, y) simply applys the scale-Operator to the contentstream. I have edited a PDF and added, text, comments, shapes, highlights to test the scaling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great explanation, much appreciated @JNK90! Now that I have a good understanding of what this PR is for, I'm confident saying it'll be a heavily used feature!
I've requested a few changes below. Once these are addressed we should be good to go!
Co-authored-by: Andrew Dillon <[email protected]>
Co-authored-by: Andrew Dillon <[email protected]>
Co-authored-by: Andrew Dillon <[email protected]>
Co-authored-by: Andrew Dillon <[email protected]>
…t3', extend 'test3' for all plattforms
@JNK90 I see you marked all my comments as resolved, but I don't see any of the changes I requested in the diff? Did you forget to push your work? Or are you still working on this? |
@Hopding I pushed my changes to the wrong branch of my fork 🤓. All changes are now in the right branch. |
@JNK90 Ah, that would explain it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Excited to get this released!
I added two functions to the PDFPage to scale the content and the annots. This enables to resize the content and annots without violating private access modifiers. The code is inspired by the Resizer Example.