597 Commits

Author SHA1 Message Date
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
124a0aefcd Unit tests for AcroForm named javascript, push button, heirarchical fields all working. 2019-07-24 14:33:06 -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
Luiz Américo
87ebd521ae
Merge pull request #998 from maiers/maiers-patch-1
Fix bug with undefined / null document properties crashing `new PDFDocument`
2019-07-11 12:04:25 -03:00
Sebastian
8dd2211ce2 simplified as per review comment by blikblum 2019-07-11 17:01:46 +02:00
Sebastian
89396ebe44 unit tests added 2019-07-11 15:52:28 +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
deeffd559c
Merge pull request #987 from blikblum/master
Fix infinite loop when text is positioned after page right margin. Based on #986
2019-06-11 21:37:24 -03: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
fd2f9dc80e v0.10.0 2019-06-06 21:11:29 -03:00
Luiz Américo
1e4fd0c933 Update browser usage in readme 2019-06-06 20:35:05 -03:00
Luiz Américo
646fa5b805 Remove saslprep dependency 2019-06-06 20:11:37 -03:00
Luiz Américo
f4888ee75b Add standalone build 2019-06-06 20:09:57 -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
Luiz Américo
d91b890494
Merge pull request #969 from floyd-may/throw-on-bad-dash
throw errors when invalid values passed to dash(...)
2019-05-07 12:26:27 -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
58d5495920
Merge pull request #970 from foliojs/jade-to-pug
Jade to Pug
2019-05-05 08:33:49 +02:00
Luiz Américo
f486d11efe Add dash unit tests 2019-05-04 22:30:34 -03:00
Luiz Américo
0938f79d1a Fix logic to check if test passes in toContainChunk 2019-05-04 22:30:08 -03:00
Luiz Américo
fba7f33c14 Normalize unit tests to use jest matcher and ES import 2019-05-04 21:10:57 -03:00
Luiz Américo
3f4052568d Improve output of toContainChunk jest matcher 2019-05-04 20:06:50 -03:00
Libor M
8f0e2ba901 update ignored files in npm 2019-05-04 13:45:40 +02:00
Libor M
f6f8694a06 missing license added 2019-05-04 13:36:55 +02:00
Libor M
1d45080575 Update yarn.lock 2019-05-04 13:31:40 +02: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
16b1802f75
Merge pull request #968 from foliojs/docs-imagemagick
Cross-platform support for generate docs
2019-05-04 05:49:35 +02:00
Luiz Américo
5cfab52910 Add test helpers to make easier to write unit tests 2019-05-03 22:05:48 -03:00
Luiz Américo
e08d2dfd47 Update babel to v7 and jest to v24 2019-05-03 21:26:15 -03: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