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
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
Devon Govett
0ad465f915
Merge pull request #554 from alafr/Image-cover-option
...
Images
2016-11-07 11:17:36 -05:00
Devon Govett
bb2161597e
Merge pull request #570 from alafr/line-wrapper-bug
...
Line wrapper bug
2016-11-07 11:15:27 -05:00
alafr
317953c54f
Remove semicolons
2016-11-07 18:11:49 +02:00
alafr
e02f69ac00
Call emitLine() only once
...
emitLine() was called twice in some cases
2016-11-06 02:28:01 +02: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
Devon Govett
56a6e6dd44
Merge branch 'master' of github.com:devongovett/PDFKit into fontkit
...
# Conflicts:
# lib/image/png.coffee
2016-08-26 11:39:33 -04:00
Devon Govett
154801ece7
fontkit removed widthOfString method
2016-08-26 11:31:12 -04: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
Andy Simms
872b290e06
Path updated to fix issues with SVG Arcs
2016-04-19 12:31:33 +01:00
Buck Doyle
c6ff802ff0
Add support for adding ArrayBuffer-based images
...
This already works for fonts, so I applied the same technique so images
can be loaded similarly.
2016-01-30 19:45:57 -05:00
Peter Ogilvie
42921fa8f1
add 1 to javascript month for pdf month num
2015-11-19 15:25:50 -08:00
Devon Govett
ae56acee5f
Fixes #428
2015-11-09 21:15:49 -08:00
Devon Govett
03a45a1354
Merge pull request #384 from MathieuLoutre/page-added-event
...
Emit an event when a page is added
2015-10-25 10:39:33 -07:00
Devon Govett
7da47a58f5
Fix another document reference in png.coffee
2015-10-25 10:33:35 -07:00
Pedro Teixeira
d4604b4a74
fixes #433
2015-10-20 09:53:52 +01:00
Ilia Loriakov
4b76170550
Fixing typo which make tests fail
...
Now fontkit branch should be functional
2015-08-27 11:36:50 +02: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
fb0b38934f
Match fontkit output for standard fonts
2015-07-26 12:30:14 -07:00
Devon Govett
926ed20285
Fix afm glyph width when not defined
2015-07-26 12:29:52 -07:00