* add indentAllLines option to indent all lines of a paragraph instead of only the first one
* update comments
* Update CHANGELOG.md
---------
Co-authored-by: Libor M. <liborm85@gmail.com>
* Set tab order when document is tagged
* Update approach and add inverse test
* Revert page dictionary setup
* Update lib/mixins/markings.js
* Update kitchen-sink-accessible.pdf
* Update CHANGELOG.md
---------
Co-authored-by: Libor M. <liborm85@gmail.com>
* Update text.js
to fix measuring text when opentype features are passed in to .text()
* added simple test
* Update CHANGELOG.md
---------
Co-authored-by: Libor M. <liborm85@gmail.com>
* adds test cases for ordered lists
* fixes broken labels for ordered lists (#1517)
* adds test for sub-lists (ordered and unordered)
* update changelog for fix of #1517
---------
Co-authored-by: David <filecage@users.noreply.github.com>
* Add an option check to acroform mixin _resolveFlags().
This resolves#1495.
* Reworked fix to remove flags from options, if they are falsey.
* Added unit test for ignoring false flags in acroforms
* Added entry for removing false flags in changelog.
This makes the resulting PDF files smaller. It's cumbersome to filter out all commands that could result in identity transforms in code that's using PDFKit, so it makes sense to have the check in the transform() function.
* adds test case with line-breaks in list items
reproduces #1486
* use LineBreaker per item and only draw `firstLine` once
fixes#1486
* boyscout: consistent naming
* boyscout: test multiple line break versions
* update changelog for fix of #1486
---------
Co-authored-by: David <filecage@users.noreply.github.com>
* Added PDF/A-2 and PDF/A-3 subsets A and B
It seems like PDF/A-2 and PDF/A-3 are not very different from PDF/A-1 as far as the A and B subsets are concerned (A requires tagging which PDFKit supports already). With this change, we can let the generated PDF present itself as PDF/A-2 or PDF/A-3.
* Updated docs and changelog for new PDF/A subsets
* Fixed an issue where ICC profile path can be wrong for built package but good for tests
* Fixed lint's unnecessary semicolon error
* Fixed pdfa1 colour profile test error
The directory where the colour profile is stored was changed, but the test was not updated.
* pdf/a1b support initial commit
Added mixin for support pdf/a1b and a few of the things it requires (xmp metadata, colour profile). Currently, the CIDSet stream is the only error it comes back with the test case I'm using, will try sorting it out next.
* Adding CIDSet when generating PDF/A
PDF/A1 b/a requires a CIDSet. This is not checked by a validator and other converters seem to add a CIDSet with a value of FF FF FF FF 0C, so this commit does the same. When extending support for PDF/A 2/3/4, we may not add a CIDSet (I think for PDF/A3 it's not required?) or we will look for a proper way to generate the CIDSet.
At this point, PDFKit should be able to generate PDF/A1b which can pass veraPDF validation and PDF/A1a if tagged is enabled.
All you have to do is set pdfa: '1a' or pdfa: '1b' in the options passed to new PDFDocument.
* pdf/a intro docs
* generalising subsets, reimplementing pdfa1 and added control over metadata
added a generalised subsets mixin which can pull in a subset at runtime.
reimplemented pdfa1 mixin as some features should be standardised across all subsets, such as storing /Info as xmp metadata for pdf >1.3
added a metadata class and mixing to control and write the metadata to a pdf
* added tests for pdfa1 and metadata and moved joinTokens in helpers
Addeds tests for pdfa1 subset and metadata.
Moved joinTokens into helpers.js as it's now used in at least two places.
Added tests for document to when metadata should be added (pdf version 1.4 or newer) and when it shouldn't (pdf version 1.3)
* updated pdf/a docs to reflect latest changes
* store color profile as icc file
* Updated changelog to include PDF/A support in Unreleased section