129 Commits

Author SHA1 Message Date
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
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
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
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
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
ad593cf422 support for named destinations 2019-03-24 08:35:36 +01:00
Luiz Américo
1e62e6ffe2 Cleanup remaining artifacts from CoffeScript conversion 2019-03-03 19:58:05 -03:00
Luiz Américo
bd0631f782 Add option to defined default font 2019-03-02 20:42:56 -03:00
Luiz Américo
a6af76467c Add prettier npm script and run it in *.js files 2019-01-07 20:51:06 -03:00
Luiz Américo
83f5f72431 Convert to EcmaScript (ES6+) (#859) 2018-11-29 08:14:45 -08:00
Ben
f91bdd61c1 Features/outline (#831)
Outline support by @alexvdev and @blforce
Close #216, close #13
2018-06-22 17:54:14 +02:00
alafr
34cf8d5fa6
Text baseline & oblique option (#585) 2018-02-02 18:39:57 +01:00
alafr
8859fdb11c
Add support for numbered and lettered lists (#597) 2018-02-02 18:18:41 +01:00
alafr
a531f433c1 Add support for link to another page (#701)
* Link to a page

* Text link can go to page 0

* Update annotations.coffee
2017-07-30 11:15:31 -07:00
Devon Govett
5ae153490d Fix word spacing
We were mutating a cached position object. Fixes #687.
2017-07-01 18:30:58 -07:00
Devon Govett
7fb08ec803 Merge branch 'arc-method' of https://github.com/bjnsn/pdfkit into bjnsn-arc-method 2017-05-29 21:31:48 -07:00
Devon Govett
d35f7cc962 Don’t save font if it has no name
Closes #661, #603.
2017-05-29 21:20:46 -07:00
Devon Govett
55147c4412 Don’t override opacity when setting fill or stroke color
Closes #329.
2017-05-29 21:01:59 -07:00
alafr
31aa437a9f Fix scale function (#596)
The function wasn't working in these cases:
scale(xFactor, yFactor)
scale(xyFactor, options)
2017-05-29 20:32:10 -07:00
Devon Govett
2e18ea25e9 Merge pull request #647 from awerlang/patch-1
print empty string instead of undefined or null
2017-05-29 20:29:12 -07:00
Devon Govett
7fd79bb269 Update text.coffee 2017-05-29 20:29:00 -07:00
Devon Govett
f9d81c6e00 Fix heightOfString with autoFirstPage: false 2017-05-23 20:04:20 -07:00
André Werlang
94939a567c print empty string instead of undefined or null
writing `undefined` or `null` to a document is hardly the user's intention, so this fixes it
2017-03-30 09:02:14 -03:00
António Marques
abf061df0b Add support for numbered and lettered lists 2016-12-14 12:10:41 +00:00
Devon Govett
63d6e5020f Move number formatter to PDFObject class 2016-12-10 11:41:31 -08:00
Devon Govett
e1a4f490b3 Merge pull request #572 from alafr/numbers
Pdf corruption with small numbers
2016-12-10 11:29:35 -08:00
alafr
c1cda04126 Remove _sMasked 2016-11-30 09:26:24 +02:00
alafr
4f26f05d29 Update text.coffee 2016-11-07 22:27:52 +02:00
alafr
ddfea70f71 Fix numbers in text.coffee 2016-11-07 22:22:20 +02:00
alafr
dba211945f Fix numbers in vector.coffee 2016-11-07 22:19:38 +02:00
Devon Govett
f9ab215ea6 Merge pull request #551 from alafr/Dash-array
Add support for dash array
2016-11-07 11:23:06 -05:00
Devon Govett
0ad465f915 Merge pull request #554 from alafr/Image-cover-option
Images
2016-11-07 11:17:36 -05:00
Rainer ziller
61bc028c15 allow setting of list bullet circle
this change will allow users to set the size of the circle on bullet list item in the options via the setting "bulletRadius"
2016-10-18 13:58:30 +02:00
alafr
baeae06d18 Fix for #559 2016-10-17 20:52:37 +03:00
alafr
bd98ce3456 Possibility to open an image without inserting it immediately in the document 2016-10-17 18:32:45 +03:00
alafr
1c08703f38 Support for dash array
PDF reference 1.7 pages 218-219
2016-09-18 16:50:20 +03:00
alafr
3cdef01461 Add 'cover' option for images 2016-09-16 00:40:15 +03:00
alafr
b9f30e2af2 Update vector.coffee
-Add closePath fixes gap visible in Chrome pdf viewer with large line widths
-Fix for too large corner radius
2016-09-06 23:46:45 +03:00
alafr
6557d916df Merge pull request #3 from bjnsn/roundedRect-patch
Adjust roundedRect() to draw circular arcs for corners - rather than …
2016-09-06 23:38:07 +03:00
Brett Johnson
9f3af02156 Fix arc() implicit return not appropriate for chaining. 2016-05-05 09:26:41 -07:00
Brett Johnson
7a03119584 Add arc() drawing method. 2016-05-05 09:17:18 -07:00
Brett Johnson
ef6d4c7aed Adjust roundedRect() to draw circular arcs for corners - rather than distorted ones with quadraticCurveTo() 2016-05-04 15:21:31 -07:00
Devon Govett
de667832fe Correctly render glyphs with x or y offsets
These offsets are generated by fontkit when laying out glyphs, for example accents which should appear above other glyphs. To render them correctly in PDF, we have to break out of the TJ command and move the text position manually.
2015-07-26 12:32:40 -07:00
Devon Govett
944cbc6cbc Merge branch 'master' into fontkit
Conflicts:
	lib/font/tables/name.coffee
	lib/font/ttf.coffee
2015-04-03 21:13:04 -07:00
Devon Govett
22a9bfdfab Get rid of PDFObject.s and use JS String object to represent PDF strings
Also improves escaping based on the spec, and detects unicode strings automatically, which are converted to UTF16-BE.
2015-03-19 20:22:44 -07:00