You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accessibility documentation says to use unavailable subset value #1804
'PDF/UA' is the correct runtime value in 0.20.2: initSubset already handles it and calls initPDFUA().
I reproduced the TypeScript mismatch with @types/pdfkit@0.17.6: its PDFKit.Mixins.PDFSubsets union lists only PDF/A values. With TypeScript 7.0.2 in strict mode, the documented option gives TS2322. For these versions, this temporary assertion on the supported literal compiles:
The declaration needs to include 'PDF/UA'; the existing runtime does not need a new option for that value. The assertion should be removed once the types include it, and should not be applied to arbitrary strings.
I also compiled and ran a complete tagged-paragraph example against the published 0.20.2 package. With the upstream Roboto font fixture, the finished PDF contains the PDF/UA-1 metadata and passes veraPDF 1.30.2's UA-1 profile. That validates this small example; the constructor options alone do not make other content accessible.
Activity
blikblum commentedon Sep 24, 2026
Please open a PR
taybin commentedon Sep 24, 2026
I'm not sure what the fix is. Is the documentation wrong or is the library type wrong, and if so can it be easily extended?
blikblum commentedon Sep 25, 2026
Add a document option to set PDF/UA and update docs
tevinch commentedon Sep 28, 2026
'PDF/UA'is the correct runtime value in 0.20.2:initSubsetalready handles it and callsinitPDFUA().I reproduced the TypeScript mismatch with
@types/pdfkit@0.17.6: itsPDFKit.Mixins.PDFSubsetsunion lists only PDF/A values. With TypeScript 7.0.2 in strict mode, the documented option gives TS2322. For these versions, this temporary assertion on the supported literal compiles:The declaration needs to include
'PDF/UA'; the existing runtime does not need a new option for that value. The assertion should be removed once the types include it, and should not be applied to arbitrary strings.I also compiled and ran a complete tagged-paragraph example against the published 0.20.2 package. With the upstream Roboto font fixture, the finished PDF contains the PDF/UA-1 metadata and passes veraPDF 1.30.2's UA-1 profile. That validates this small example; the constructor options alone do not make other content accessible.
blikblum commentedon Oct 4, 2026
One of the pending tasks is to get the types builtin in the package