-
-
Notifications
You must be signed in to change notification settings - Fork 669
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 image stamping for TextField elements #700
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.
@btecu Good idea! A couple things before merging:
- Would you please update one of the existing integration tests with form field to exercise this new method on
TextField
? - Can you create a new enum called
ImageAlignment
rather than using theTextAlignment
enum? Their values happen to be the same right now, but I'd prefer to keep them separated.
- Add test for image stamping for TextField elements
@Hopding feedback addressed! |
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! Thanks again @btecu. I'll tweak a few things and then this feature will go out in the next release of pdf-lib.
* Add image stamping for TextField elements (#700) * Add image stamping for TextField elements * - Add `ImageAlignment` - Add test for image stamping for TextField elements * Cleanup Co-authored-by: Bj Tecu <btecu@users.noreply.github.com>
* Add image stamping for TextField elements (#700) * Add image stamping for TextField elements * - Add `ImageAlignment` - Add test for image stamping for TextField elements * Cleanup Co-authored-by: Bj Tecu <btecu@users.noreply.github.com>
Allows stamping an image on a
TextField
element in addition toButton
elements.Additionally, it now handles alignment, defaulting to
Center
forButton
and usingTextAlignment
forTextField
.