274 Commits

Author SHA1 Message Date
Luiz Américo
acbeceb2b3 Use a loop to copy png image data instead of Buffer.copy 2018-12-23 20:30:40 -03:00
Luiz Américo
ffdda49bd6 Fix grayscale PNG images with alpha channel 2018-12-23 00:44:21 -03:00
Luiz Américo
faad6e82db Fix defining Mask for grayscale transparent PNG files 2018-12-22 22:48:02 -03:00
Luiz Américo
eb60ed1efd
Merge pull request #889 from blikblum/png-sync
Use sync version of zlib deflate method to compress png images
2018-12-22 22:15:04 -03:00
Luiz Américo
8f1bb8c744
Merge pull request #888 from blikblum/simplify-pdfpage
Use property getter to define PDFPage lazy dictionaries
2018-12-22 22:14:49 -03:00
Luiz Américo
52c3b45e2e Use property getter to define PDFPage lazy dictionaries 2018-12-21 20:50:22 -03:00
Luiz Américo
4e90b87d82 Remove setTimeout call in PDFReference.finalize 2018-12-21 20:33:14 -03:00
Luiz Américo
6488c534f7 Use sync version of zlib deflate method to compress png images 2018-12-21 19:40:44 -03:00
Luiz Américo
883983aa3d Import test dependencies directly from src through babel-jest. Adapt relative paths accordingly 2018-12-20 13:33:05 -03:00
Yang Liu
2651a74012 Organize permissions in option to an object 2018-12-17 21:20:20 +09:00
Yang Liu
2ef9d7d6a3 Allow customization of randomizer 2018-12-17 21:20:19 +09:00
Yang Liu
f5b6ddd2a9 Add PDF security features with ES6 2018-12-17 21:20:19 +09:00
Luiz Américo
83f5f72431 Convert to EcmaScript (ES6+) (#859) 2018-11-29 08:14:45 -08:00
Aaron Fischer
2567227a92 Allows the text continue feature to work when the starting string is empty 2018-06-29 18:25:19 +02:00
MichaelK
93061f3210 Fix bug with \n translation (#797)
This causes \n characters to be displayed more consistently.
2018-06-29 18:23:07 +02:00
MichaelK
7839a41f15 Long running loop fix (#796)
Fix long-running loop
This can be caused by having text with a huge number of spaces.
2018-06-29 18:05:43 +02:00
Oleksandr Martyshchenko
56c7debb89 Fix linewrapper ellipsis inifinite loop (#779) 2018-06-29 17:54:15 +02: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
3e516857fb
Merge pull request #763 from alafr/cmyk-gradient
support CMYK gradients
2018-02-02 17:44:32 +01:00
alafr
d1cb5268b4
Merge pull request #764 from alafr/undo-bug
Fix linewrapper bug
2018-02-02 11:53:17 +01:00
alafr
873df76b08
support CMYK gradients 2017-12-25 12:31:54 +01:00
alafr
151200dd34
Fix linewrapper bug
- Fix #689 (the bug I created last year)
- Fix #345 (the original issue)
2017-11-19 00:29:17 +01:00
Frank Böhmer
c650577ecd Fixed line_wrapper.coffee: (while w > @spaceLeft) did run endless, if space is to tight for even a single character 2017-08-24 09:28:06 +02: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
520096ac46 Merge branch 'master' of github.com:devongovett/pdfkit 2017-05-29 21:20:56 -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
Fyodor
ed07a06223 Fix wrong escape of metadata when using UTF-16 (#618) 2017-05-29 21:10:01 -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
6e9e58f5d2 Implement word cache around fontkit
Caches the results of fontkit layout calls, which can be expensive depending on the opentype features in the font. Splits up text by words and shapes each individually to increase cache efficiency.
2017-05-29 15:19:55 -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
f65ab0052f Fix whitespace, split long line and...
... keep 'grad.transform' so that the old api continues working as before
2016-11-30 09:46:13 +02:00
alafr
c1cda04126 Remove _sMasked 2016-11-30 09:26:24 +02:00
alafr
c892bc348b Fix issues with opacity gradients
When there is opacity ≠ 1 specified, the gradient is drawn and masked on a "Tiling Pattern". The tiling has BBox, XStep & YStep values equal to the dimensions of the page, to avoid any clipping or tiling repetition. Patterns are unaffected by the "Current Transformation Matrix" so the clipping rectangle is always aligned with the page borders (SMasks and Groups don't have this property). Problems could possibly happen if a gradient is embedded on multiple pages (this doesn't work anyway) of different size.

This pull request resolves the following issues:
- Fix use of opacity gradients with fillAndStroke (#214)
- Fix the reuse of the same gradient after transformations
- Fix clipping of some gradients with opacity
- Add 'transform' function to the gradient object
2016-11-28 11:03:57 +02:00
alafr
4f26f05d29 Update text.coffee 2016-11-07 22:27:52 +02:00
alafr
83b5a965d7 Remove function fixRoundingError 2016-11-07 22:24:45 +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
alafr
d6b7fe88e4 Add new function number(n) 2016-11-07 22:13:30 +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