337 Commits

Author SHA1 Message Date
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
Jim Pravetz
9d6f6f7d1f Fixed Subtype naming (was SubType) to get forms to start showing up. 2019-07-17 20:45:08 -07:00
Jim Pravetz
c086abe30a Begin adding AcroForm support 2019-07-17 18:13:29 -07:00
Sebastian
8dd2211ce2 simplified as per review comment by blikblum 2019-07-11 17:01:46 +02:00
Sebastian Maier
546a7f82a3
Fix bug with document properties being undefined
`generateFileID` builds a hash on some document properties, some of them might be undefined or null such that `toString()` will fail. Replaced `toString()` with `String(value)`
2019-07-11 14:54:23 +02:00
Luiz Américo
f6ba2ef0c0 Fix infinite loop when text is positioned after page right margin. Based on #986. Fixes #477 #877 #391 2019-06-11 21:36:51 -03:00
Luiz Américo
f80058a68a Uses full saslprep path in import (fix build) 2019-06-06 20:08:10 -03:00
Luiz Américo
1d7a18c468 Use local, optimized version of saslprep package 2019-06-06 19:44:27 -03:00
Luiz Américo
4d02fff04e Remove deprecated method PDFDocument.output 2019-06-06 19:19:11 -03:00
Floyd May
5eb7b0d978 code review tweaks 2019-05-07 08:32:25 -05:00
Luiz Américo
77dce77341
simplify string join expression
Co-Authored-By: floyd-may <floyd.may@gmail.com>
2019-05-07 08:29:07 -05:00
Floyd May
fd29fe2f99 throw errors when dash receives invalid args 2019-05-06 08:51:49 -05:00
Libor M
65b79f7d7c
Merge branch 'master' into es-syntax-for-default-value 2019-04-18 08:39:33 +02:00
Luiz Américo
f7a2a87ebb
Merge branch 'master' into named-destinations-es6 2019-04-17 19:31:11 -03:00
Danny Kirchmeier
c17bf39710 Fix links to page numbers within the document 2019-04-17 10:41:30 -05:00
Libor M
a2abfb4765 ES6 syntax for default values 2019-03-24 13:51:47 +01:00
Libor M
c8faebb6a5 fixed es syntax for default value 2019-03-24 13:39:26 +01:00
Libor M
1467ed092f fix format 2019-03-24 08:55:01 +01:00
Libor M
ad593cf422 support for named destinations 2019-03-24 08:35:36 +01:00