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.
#269
This is almost entirely copied from Heston1's PR #2373. I just fixed the conflicts and removed everything that was in there that is now implemented directly in pdfkit as the original PR uses @foliojs-fork/pdfkit which I think has now become the main branch for pdfkit, but I might have misunderstood.
When building the original PR it didn't work for me, there was an issue with @foliojs-fork/pdfkit & @foliojs-fork/fontkit not being installed and when I fixed that the only font that the text fields would display was some symbol font.
In my version the example seems to work, but not when using the font Roboto, I'm sure there are other font's that also won't work. It seems fine with Helvetica. In Roboto many characters (most upper case letters, all numbers and some lowercase letters) only show as a large space.
I'm fairly out of my depth with this as I know nothing about how fonts work, or what might cause this. Currently pdfkit doesn't support radio buttons or checkboxes, even though checkboxes very much seem to work other than not being able to set the initial value. Radio buttons seem not to really work, so I've just removed them from the example.
@liborm85 any guidance would be appreciated on what I need to do to get this in a mergeable state.