739 Commits

Author SHA1 Message Date
Andrei Augustin
408dc4e9ba
Add PDF/UA subset (#1485)
* Added PDF/UA subset and its metadata

* Added PDF/UA metadata unit tests

* Added PDF/UA subset to accessibility docs

* Updated change log for PDF/UA subset
2023-12-17 16:11:46 -03:00
Luiz Américo
5bbd9a18cb
Support Jpeg Exif Orientation (#1482)
Co-authored-by: Franklin Strube <fstrube@morevang.com>
Co-authored-by: Luiz Américo Pereira Câmara <blikblum@users.noreply.github.com>
2023-12-03 07:48:00 -03:00
Libor M
275734a9f1 update canvs 2023-11-10 14:29:39 +01:00
Libor M
812ca1ac4f
Node.js 20 LTS 2023-11-10 14:16:07 +01:00
Libor M
82920c612a 0.14.0 v0.14.0 2023-11-09 08:34:22 +01:00
Libor M
befd43266f
Merge pull request #1471 from mflasquin/bump-crypto-js
Bump crypto-js from 4.0.0 to 4.2.0 to fix CVE-2023-46233
2023-11-08 13:57:46 +01:00
Maxime Flasquin
71350565d5 Bump crypto-js from 4.0.0 to 4.2.0 to fix CVE-2023-46233 2023-10-30 15:43:16 +01:00
Libor M
4ec77ddc8c
Merge pull request #1456 from andreiaugustin/docs_pdfa_update
Added note to docs regarding PDF/A not supporting the standard AFM fonts
2023-07-13 12:28:24 +02:00
Andrei Augustin
92c593f208 Added note to docs regarding PDF/A not supporting the standard AFM fonts 2023-07-13 10:52:07 +03:00
Andrei Augustin
c1d7700421
Support for PDF/A-2 and PDF/A-3 subsets (#1432)
* 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
2023-03-09 08:00:08 -03:00
koooge
d81f13ba2d
test: CI node16 and 18 (#1426)
* test: CI node16 and 18

Signed-off-by: koooge <koooooge@gmail.com>

* chore: Replace jest-screenshot with jest-image-snapshot

Signed-off-by: koooge <koooooge@gmail.com>

* test: git mv snapshots

Signed-off-by: koooge <koooooge@gmail.com>

* test: Minor-upgrade canvas

Signed-off-by: koooge <koooooge@gmail.com>

---------

Signed-off-by: koooge <koooooge@gmail.com>
2023-03-07 09:30:34 -03:00
koooge
376b31bb98
test: Upgrade jest 26 to 29 (#1427)
* test: Upgrade jest 26 to 28

Signed-off-by: koooge <koooooge@gmail.com>

* test: Use jsdom instead of node

Signed-off-by: koooge <koooooge@gmail.com>

* test: Delete 12 in CI for jest@28

Signed-off-by: koooge <koooooge@gmail.com>

* test: Upgrade jest 28 to 29

Signed-off-by: koooge <koooooge@gmail.com>

* test: Delete 14 in CI for jest@29

Signed-off-by: koooge <koooooge@gmail.com>

---------

Signed-off-by: koooge <koooooge@gmail.com>
2023-03-06 12:24:56 -03:00
Andrei Augustin
ba4e7cb698
Fixed lint's unnecessary semicolon error (#1414)
* 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.
2023-03-05 15:25:01 -03:00
Andrei Augustin
3904188903
Initial support for PDF/A-1a/b (#1395)
* 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
2023-01-06 19:25:11 -03:00
Libor M
3f69586f3c
Merge pull request #1352 from cesargdm/patch-1
Update getting_started.md
2022-03-09 11:27:11 +01:00
César Guadarrama
9c71eb8c03
Update getting_started.md
Remove unexpected semicolon
2022-03-09 00:29:01 -06:00
Jeff Brower
7cd6472fd2
Fix typo in paper_sizes.md (#1302)
Correct spelling of 'standard'.
2021-11-24 16:39:20 -03:00
Luiz Américo Pereira Câmara
352524718a v0.13.0 v0.13.0 2021-10-24 08:23:35 -03:00
Luiz Américo Pereira Câmara
9098c4175e Ignore browserify bundle file 2021-10-24 08:05:02 -03:00
Jernej Logar
4c5e73a06c
Tiling pattern support (#526) (#1311)
* tiling pattern support (foliojs#526)

based on strokovnjaka/pdfkit@b85dd55622

Co-authored-by: Jernej Logar <jernej.logar@plandela.si>
2021-10-24 07:50:52 -03:00
Mike Horn
fd72a7888c
Fix syntax highlighting on pdfkit.org (#1308) 2021-10-06 13:42:12 -03:00
Luiz Américo Pereira Câmara
55ed6d5473 Add missing dependencies to webpack example 2021-08-03 13:02:47 -03:00
Luiz Américo Pereira Câmara
29216b7d2b Fix and cleanup webpack example 2021-08-01 14:07:13 -03:00
Luiz Américo Pereira Câmara
e9c7d9e4b5 v0.12.3 v0.12.3 2021-08-01 12:37:53 -03:00
Luiz Américo Pereira Câmara
cc6331b096 Add examples folder to .npmignore 2021-08-01 12:32:50 -03:00
Luiz Américo Pereira Câmara
62ed253ff9 Remove src folder from .gitignore 2021-08-01 12:22:41 -03:00
Libor M
5ff4eae3f5 fix ignore crypto in standalone build 2021-07-24 07:18:55 +02:00
David Lilue
a41f33886f
Refactor on equality check function (#1280)
Avoidable 'if' statement
2021-07-13 18:52:41 -03:00
Libor M
b5b0ac1bac Revert "github actions - add node.js 16"
This reverts commit 7b96ca6524154d034bf85e480835f77ed0573f82.
2021-07-13 14:12:29 +02:00
Libor M
7b96ca6524 github actions - add node.js 16 2021-07-13 13:37:16 +02:00
Libor M
529acf4f25 fix tests 2021-07-13 13:31:15 +02:00
Luiz Américo Pereira Câmara
65670353f9 Add webpack example 2021-07-11 23:35:02 -03:00
Luiz Américo Pereira Câmara
f7947c8374 Upgrade crypto-js to 4.0.0 2021-07-11 10:43:54 -03:00
Luiz Américo Pereira Câmara
8f70c3323a Remove package-lock.json 2021-07-11 10:41:58 -03:00
Luiz Américo Pereira Câmara
5fbdfd6383 Reorganize and cleanup examples 2021-07-10 23:20:27 -03:00
Luiz Américo Pereira Câmara
dd6569ed7e Add interactive browser demo files to publish website script 2021-07-10 19:38:57 -03:00
Libor M
4898dcb0be
update ignored files in npm 2021-07-02 11:14:50 +02:00
Libor M
a4c5756966 update lock files 2021-07-01 17:54:01 +02:00
Libor M
aa8c65d575 add 0.12.1 from npm release 2021-07-01 17:29:57 +02:00
adrift2000
4700537d82
Fix for PDF accessibility check. (#1265) 2021-06-22 12:48:53 -03:00
Simon Osterlehner
131df9e0ae
Add option to define AcroForm fontSize. Fixes #1088 2021-05-29 18:12:36 -03:00
Subhi Al Hasan
6338314daf
Allow applying 'underline' and 'strike' text styling together on a text (#1253)
Co-authored-by: Subhi Al Hasan <subhi.al.hasan@freiheit.com>
2021-05-28 13:51:12 -03:00
Giovanni Vinaccia
c9431d6c9f fix(demo): debounces the preview to avoid window crash 2021-05-06 13:39:19 -03:00
Libor M
120c3f9519
Update CHANGELOG.md 2021-04-10 16:00:41 +02:00
Luiz Américo
d78a4f8cb6 Improve website publish script v0.12.0 2021-04-04 18:09:32 -03:00
Luiz Américo
d0d7e64e26 Add script to automate publishing website into gh-pages branch 2021-04-04 17:57:57 -03:00
Luiz Américo
84f1c8bc4d v0.12 2021-04-03 21:06:31 -03:00
Luiz Américo
dcbd73f355 Fix source code link in website template 2021-04-03 21:03:50 -03:00
Luiz Américo Pereira Câmara
403cbaf7fc Handle headers with inline code in generate_website script 2021-03-28 12:29:01 -03:00
BobK
5b56523405
Fix/add forms to docs (#1173)
chore: add forms.md to generate files
2021-03-28 10:14:05 -03:00