355 Commits

Author SHA1 Message Date
Ben Schmidt
923c495022 Correct marking bug and improve demo accessibility. 2021-01-15 16:43:49 -03:00
Ben Schmidt
e3fa4f7c7b Remove accidental tabs. 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
4c4a49ebff Guard against adding a structure element to more than one parent. 2021-01-15 16:43:49 -03:00
Ben Schmidt
2ed3782473 Guard against invalid structure element children. 2021-01-15 16:43:49 -03:00
Ben Schmidt
057215fc8f Guard against adding children to ended structure elements. 2021-01-15 16:43:49 -03:00
Ben Schmidt
9c0aaec172 Remove unnecessary constructors. 2021-01-15 16:43:49 -03:00
Ben Schmidt
d565f862c0 Fix linter warnings. 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
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
43128adbb3 Add number tree. 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
Libor M
ba62aeff11 fix Buffer() is deprecation warning #1114 2020-07-25 11:25:56 +02:00
Rocco Bruyn
812a6db941 Pass 'encoding' param of VFS' readFileSync to 'toString'
Fixes #1133
2020-07-19 16:53:45 +02:00
adrift2000
d520bf2e02
Update security.js
Access permissions are not applied to PDF if pdfVersion is "1.7ext3".
2020-07-02 11:51:33 +10:00
freund17
df33cbcbe3
Added valueOf() to generateFileID
Fixes https://github.com/foliojs/pdfkit/issues/1110
2020-05-19 16:13:27 +02:00
Nathanael Anderson
db6a8117d2 Expose LineWrapper class 2020-04-08 11:27:17 -05: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
Devon Govett
9fbd52e033
Merge branch 'master' into support-png-interlaced 2019-11-16 19:26:51 -08:00
Luiz Américo
a7116f244c Pass number function directly to map 2019-11-15 22:59:00 -03:00
Luiz Américo
4d8de9164c Fix gradient with multiple stops (#1045) 2019-11-15 22:56:10 -03:00
Luiz Américo
44e265bc2a
Merge pull request #1023 from URSELF-FR/master
Fix infinite loop when lineWidth is smaller than width of a character
2019-11-14 12:52:14 -03:00
VincentGuinaudeau
acf318b87c comments, test and changelog entry for fix when a character is too bigger than the width of the text. 2019-11-14 12:08:04 +01:00
Luiz Américo
51d4fdd0a3
Merge pull request #1020 from padraiggalvin/link-annotation-flag
Set link annotation flag to print by default
2019-11-13 19:32:04 -03:00
Luiz Américo
30ec8b0c30 png: use predictor 1 (none) for interlaced images 2019-09-29 00:03:07 -03:00
Luiz Américo
c658bef0cc png: decode pixels when image is interlaced 2019-09-28 21:26:11 -03:00
Luiz Américo
50dbed9401 Remove redundant value existence checks 2019-09-28 21:21:30 -03:00
VincentGuinaudeau
17e08a66dd Fix infinite loop when lineWidth is smaller than width of a character. Not sure about what to do in this case yet. 2019-09-11 14:57:51 +02:00
Pádraig Galvin
058f6fa5e7 Fix typo in comment 2019-09-06 18:54:41 +02:00
Pádraig Galvin
f6cd98666e Set link annotation flag to print 2019-09-05 16:41:00 +02:00
Pádraig Galvin
068e9afe05 Explicitly define default value for CIDToGIDMap 2019-09-04 15:04:27 +02: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
4b0f93fb9a Fix bug with format number displaying currency.
Remove new additions to gitignore.
2019-07-29 17:25:10 -07: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
554cf3d9ad Changed addNamedJavaScript to accept string instead of (nodejs-only) buffer.
Got jest tests running by setting setupFilesAfterEnv to include toContainChunk (not clear why this became necessary).
Modified toContainChunk to accept RegExp for all but first parameter of array.
AcroForms partial tests working.
2019-07-24 13:56:24 -07:00
Jim Pravetz
e4924bda9a Do not add JavaScript to Catalog/Names until a named JavaScript is added.
Needed to prevent existing unit tests from failing.
2019-07-24 12:09:42 -07:00
Jim Pravetz
6478048630 Bug fixes for setting Ff flag and alignment. 2019-07-21 18:31:13 -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
Jim Pravetz
1553ca8498 Fixes to get field heirarchy working 2019-07-19 09:04:40 -07:00
Jim Pravetz
e135aad920 Adding hierarchical field support to AcroForms 2019-07-18 21:28:36 -07:00
Jim Pravetz
b53c6a7dd3 Added field align property support.
Fixed string field values so that they use CosString and not CosName.
2019-07-18 17:33:05 -07:00