119 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
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
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
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
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
Simon Osterlehner
131df9e0ae
Add option to define AcroForm fontSize. Fixes #1088 2021-05-29 18:12:36 -03:00
Luiz Américo
d78a4f8cb6 Improve website publish script 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
Steffen Matheis
3cd88b296c rename fileAttachmentAnnotation to fileAnnotation 2021-03-25 15:13:58 -03:00
Steffen Matheis
7219fd07a9 add support for embedded files and file attachment annotations 2021-03-25 15:13:58 -03:00
Ben Schmidt
923c495022 Correct marking bug and improve demo accessibility. 2021-01-15 16:43:49 -03:00
Ben Schmidt
e3442a9aa2 Add shortcut for elements containing only marked content. 2021-01-15 16:43:49 -03:00
Ben Schmidt
f1f1559720 Regenerate PDF guide. 2021-01-15 16:43:49 -03:00
Ben Schmidt
c2ec121ab8 Support automatic marking and structure construction for text. 2021-01-15 16:43:49 -03:00
Ben Schmidt
52033990bd Minor fixes/improvements to developer documentation. 2021-01-15 16:43:49 -03:00
Ben Schmidt
9b3aa7b50a Fully support PDF/UA. 2021-01-15 16:43:49 -03:00
Ben Schmidt
272444e397 Fully support accessibility features from PDF reference. 2021-01-15 16:43:49 -03:00
Ben Schmidt
c177874e82 Fully support Tagged PDF. 2021-01-15 16:43:49 -03:00
Ben Schmidt
bc09c32d1b Support marked structure content and logical structure. 2021-01-15 16:43:49 -03:00
Ben Schmidt
ef5e52b2ad Support marking content. 2021-01-15 16:43:49 -03:00
Luiz Américo
326350b7f9 Fix eslint and prettier warnings 2020-09-09 20:35:10 -03:00
pfdgithub
76da594762 fix guide generate link
https://github.com/foliojs/pdfkit/issues/991
https://github.com/foliojs/pdfkit/pull/1013
2020-08-12 12:01:58 +08:00
Evgeny.Baram
75340f0d33 Fixed mistake in Forms documentation (set font) 2020-02-05 12:53:20 +07:00
Jim Pravetz
e2a464c1dc Merge branch 'master' of https://github.com/foliojs/pdfkit
# Conflicts:
#	lib/mixins/annotations.js
2019-12-02 11:09:47 -08:00
Jim Pravetz
e2eed1f311
Update forms.md
Fix typo readyOnly -> readOnly
2019-12-02 10:52:21 -08:00
Paul Winkler
b410466068
enable removing link annotation in continued text
Text options currently add a link annotation unless the link is `undefined` or `null`. When the text options are built using the continued flag any value that is `null` or `undefined` is overridden by the continued options. As `0` is used for a first page link, it should be allowed to specify `false` to stop continued text being a link.
2019-09-02 16:45:58 +01:00
Jim Pravetz
cfb56e2097 Bug fixes found during unit testing. 2019-07-29 17:00:16 -07:00
Jim Pravetz
5a2fdd71eb Removed direct support for radio and checkboxes.
Added support for options.select, options.value, options.defaultValue.
Fixed font implementation so that individual form fields can have their own font setting.
Renamed methods, reducing reference to PDF langauge syntax.
Added 'type' specifier to formAnnotation method.
2019-07-29 15:46:44 -07:00
Jim Pravetz
293b66b794 Documentation fixes.
Removed unused method from acroforms mixin.
2019-07-28 22:28:36 -07:00
Jim Pravetz
8b92a5173b Making options and formatting more user friendly and improving the docs.
Feedback from https://github.com/foliojs/pdfkit/pull/1002
2019-07-28 22:14:20 -07:00
Jim Pravetz
0514363199 Reformatted some files using prettier.
Rename widgetAnnot method to widgetAnnotation
Rename initAcroForm method to initForms
Ensure existing unit tests pass.
Add formChoice example to test-acroform.js.
Minor documentation changes for forms.
2019-07-25 15:07:10 -07:00
Jim Pravetz
1c8bd992f6 Finished documentation for AcroForms support 2019-07-24 14:44:14 -07:00
Jim Pravetz
bf75b0881a Added shortcut support for formatting form text inputs.
Fixed annotations to not automatically add Border and C for Widget annotations.
More documentation.
2019-07-21 12:19:08 -07:00
Jim Pravetz
9f6c5fb825 Added documentation for AcroForms.
Fixed spelling of NeedAppearances (doh!).
Added backgroundColor and borderColor options (for push buttons).
Added label option (for push buttons).
2019-07-20 21:16:58 -07:00
Floyd May
fd29fe2f99 throw errors when dash receives invalid args 2019-05-06 08:51:49 -05:00
Libor M
b890ab482b migrate from Jade to Pug 2019-05-04 13:22:09 +02:00
Libor M
5426f6d0c5 cleanup after decaffeinate 2019-05-04 08:04:24 +02:00
Libor M
9a9d03916b switch to cross-platform ImageMagick (#966) 2019-05-01 13:33:27 +02:00
Libor M
c759486d5e fixed writing pdf example files 2019-05-01 07:35:13 +02:00
Libor M
e641a78508 links update 2019-04-30 15:44:49 +02:00
Libor M
5d5d8c4fd5 fix generate website and guide 2019-04-30 15:34:59 +02:00
Libor M
4863560826 fix paper sizes page 2019-04-30 15:28:13 +02:00