Repository navigation
Conversation
|
@cYoren is attempting to deploy a commit to the diegomura Team on Vercel. A member of the Team first needs to authorize it. |
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a
<Checkbox>writes its value as a literal string, so the field reads/V (/Yes)instead of/V /Yes. viewers that draw from/ASshow a tick, but anything reading the value sees an unchecked box. pdf-lib'sisChecked()returns false, mupdf reports/Yeswith the slash, and a tool that rebuilds appearances from/Vunticks it. iso 32000 12.7.4.2.3 wants a name object there.cause:
parseCheckboxOptionspassedvalue: '/Yes'anddefaultValue: '/Yes'. pdfkit maps those toV/DVand wraps them in aStringobject, which serialises as a literal./ASescapes this becauseaddFormAnnotationmerges it into the field dict as a plain string.fix:
VandDVnow go into the dict next toAS, as plain strings without the slash, so pdfkit writes them as names.the unchecked box still writes
/V /Offand reports false.verified by rendering a document with one checked and one unchecked box, then reading it back with pdf-lib, and by a unit test for the field dict and annotation. the render and svgkit suites pass, eslint and prettier clean.
packages/rendertypecheck fails onaddBookmarks.tsandrenderSvgImage.ts, which this change does not touch.closes #3617