99 Commits

Author SHA1 Message Date
Devon Govett
f9d81c6e00 Fix heightOfString with autoFirstPage: false 2017-05-23 20:04:20 -07: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
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
Devon Govett
6b2bea9835 Merge branch 'master' of github.com:devongovett/pdfkit into fontkit
Conflicts:
	lib/font/table.coffee
	lib/font/tables/cmap.coffee
	lib/font/tables/glyf.coffee
	lib/font/tables/head.coffee
	lib/font/tables/hhea.coffee
	lib/font/tables/hmtx.coffee
	lib/font/tables/loca.coffee
	lib/font/tables/maxp.coffee
	lib/font/tables/name.coffee
	lib/font/tables/os2.coffee
	lib/font/tables/post.coffee
2014-11-27 20:51:58 -08:00
Devon Govett
7bab1db1a5 Support passing opentype features to text methods 2014-11-27 20:48:44 -08:00
Laszlo Balogh
18927a5d91 Fixed diminishing left-margin 2014-11-21 16:37:30 +00:00
Devon Govett
09ed15b2e4 Fix unicode annotations 2014-08-29 11:49:20 -04:00
Devon Govett
65f40376cd Merge branch 'master' into fontkit
Conflicts:
	lib/font.coffee
2014-08-10 10:56:30 -04:00
Devon Govett
e58a7ce809 Formatting 2014-07-14 20:48:00 -07:00
jkol
64df00fa13 Added "valign" option to image "fit" scaling
valign can be set to "center" or "bottom" now and when "valign" === "center" is combined with "align" === "center" any aspect ratio image can be centered into a bounding area.
2014-07-14 18:23:11 -05:00
Devon Govett
163562c50a Add support for kerning data to the text mixin 2014-07-06 00:15:31 -07:00
Devon Govett
0c5f818e23 Split PDFFont class into separate subclasses for embedded and standard fonts 2014-07-06 00:03:12 -07:00
Devon Govett
4ce53698c0 Replace font engine with new fontkit module 2014-07-03 18:57:36 -07:00
Devon Govett
6a2c306680 Don't include newlines in text fragments 2014-07-03 14:58:50 -07:00
Ryan Wersal
c77add8f56 Remove text state handling as it doesn't surive graphic stack saves/restores
Saving and/or restoring the graphics state causes each text object to have to
reinitialize that text state. As a result, the mode/characterSpacing commands
would not get re-added until their value(s) had changed.
2014-05-10 01:11:06 -05:00
Ryan Wersal
aadc589a62 Improve sizing of text underline 2014-05-09 00:05:17 -05:00
Devon Govett
a6f6f4df8a Don't use trimRight since it isn't supported in IE 2014-04-14 09:58:26 -07:00
Devon Govett
4b8b031188 Don't embed fonts until they are actually used 2014-04-12 20:45:15 -07:00
Devon Govett
bb9b77cb82 Allow loading fonts from Buffers in addition to filenames 2014-04-12 20:44:19 -07:00
Devon Govett
665fd935ef Make loading images from buffers way faster by not converting to a string inadvertently 2014-04-06 19:19:17 -07:00
Devon Govett
8eece7e9ea Make sure heightOfString doesn't break pages 2014-03-29 20:36:10 -07:00
Devon Govett
c72b50927c Add heightOfString method that uses the line wrapper without actually adding content to the document.
Very useful for layout purposes
2014-03-29 20:22:21 -07:00
Devon Govett
cf564ac3da Fixes for text justification 2014-03-29 19:56:36 -07:00
Devon Govett
f8a40dba76 Make PDFDocument a node stream 2014-03-23 17:11:48 -07:00
Devon Govett
1305a9592a Switch to 2 space indentation 2014-03-23 12:25:09 -07:00
Devon Govett
350863bfda Fix the ellipse method 2014-02-24 23:25:41 -08:00
Devon Govett
c1319acff8 Allow 0 opacities 2014-02-24 01:09:27 -08:00
Devon Govett
cb81273b49 Trim spaces from the ends of lines when right aligning 2014-02-17 22:02:55 -08:00
Devon Govett
18512661b5 Apply current transformation to annotations 2014-02-17 22:01:49 -08:00
Devon Govett
3f15f761e2 Calculate lineWidth of underline/strike based on font size 2014-02-17 02:34:27 -08:00
Devon Govett
7df3ccdf4d Add link, underline, and strike options to text method. #183
Should make it way easier to do these common things.
2014-02-17 02:21:29 -08:00
Devon Govett
6a323bf0a2 Make sure justified wordSpacing value is always > 0 2014-02-17 02:19:11 -08:00
Devon Govett
9357ff5a4a Extend text options for continued segments 2014-02-17 02:18:40 -08:00