-
-
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
Need way to change font size for text inserted into existing field #727
Comments
Look at the code that retrieves the font size: pdf-lib/src/api/form/appearances.ts Lines 123 to 135 in 2b4ee6b
You just have to reverse the process. The |
Yes, you can use pdf-lib/src/core/acroform/PDFAcroField.ts Lines 85 to 87 in 2b4ee6b
|
@btecu: Great, thanks again!! |
@duffyd Just want to mention that what @btecu said is accurate. Are you planning to make a PR that introduces an API for changing a text field's font size? If so, note that the If you're not planning to make a PR, then I'll go ahead and close this issue. |
Hi @Hopding, I'm happy to do a PR but just concerned whether you require some tests as well? Just I've never done testcases/etc in JS before. JS coding is fine, though. |
@duffyd There will need to be tests, but we can work through those once you finish the code. I can help you on the tests if necessary. They're not too hard to write. Note that some of them will need to be integration tests, which are just run-of-the-mill scripts (e.g. test8.ts). But again, I can help you with those. Please be sure to read https://github.com/Hopding/pdf-lib/blob/master/CONTRIBUTING.md before you get started. |
@Hopding I've finished writing the code and have also successfully got an integration test running. How should I create a PR? Fork project into my own GitHub repo and then create a PR or create a fork in your repo? |
@Hopding just reiterating my comment in my PR - all requested changes have been implemented and are in my fork awaiting approval. |
Support for this added in v1.16.0 |
BH |
The text was updated successfully, but these errors were encountered: