-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 support for textfied & choice widgets printing #12112
Conversation
c2d741e
to
bbbf4d4
Compare
f2845fe
to
e832a80
Compare
054bd05
to
670e91a
Compare
@timvandermeij, ping |
Tim, if you don't have time, I free to review this as well. |
Like the original forms PR this one is pretty big, making it difficult to oversee that all cases are handled and tested. Can we split off the multiline and comb field handling to a follow-up PR to limit the scope here so it's easier to review? |
@@ -789,6 +789,10 @@ function stringToPDFString(str) { | |||
return strBuf.join(""); | |||
} | |||
|
|||
function escapeString(str) { |
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.
Why is escapeString
necessary in this PR? It's not trivial to read, so if we really need it it would need a unit test like the other util.js
functions.
renderForms, | ||
annotationStorage | ||
|
||
if (!this.data.hasText) { |
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.
Does hasText
indicate that it's an editable widget? Maybe editable
would be a better name then?
|
||
const fontInfo = await this.getFontData(evaluator, task); | ||
const [font, fontName] = fontInfo; | ||
let [, , fontSize] = fontInfo; |
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 looks a bit odd. Can we at least use underscores for the unused parts? Otherwise let fontSize = fontInfo[2]
would probably be more readable.
Ok I splited the PR into 3: #12175, #12176 and #12177. |
Thank you! I'll take care of reviewing them today. There has been quite a lot of activity lately for PDF.js, which is really good, but also takes up quite some time to get everything reviewed. The previous patches turned out really good though, so I have no doubt we can get these merged soon as well! |
Closing this one in favor of the split up ones. |
No description provided.