117 Commits

Author SHA1 Message Date
Devon Govett
df43e0eeb0 Set opacity to 1 if none passed to fillColor and strokeColor 2014-02-16 11:49:09 -08:00
Devon Govett
0272b66e00 Release v0.3.0 2014-02-16 02:42:12 -08:00
Devon Govett
518d545538 Fix some justification issues 2014-02-16 02:00:29 -08:00
Devon Govett
ef6578a486 Rewrite the line wrapper to use an implementation of the Unicode Line Breaking Algorithm
Should solve a huge number of issues. The regular express based word matching from before was not good. It was overzealous and caused the most bugs of anything in the project. It also didn't work at all for languages like Chinese which don't have spaces between words.

The new wrapping algorithm supports all of this. It is a separate module at http://github.com/devongovett/linebreak.
2014-02-16 02:00:18 -08:00
Devon Govett
897630ecb9 Fix some issues with indentation in the line wrapper 2014-02-16 01:56:25 -08:00
Devon Govett
2554deddbc Update example pdf 2014-02-15 01:30:10 -08:00
Devon Govett
741b9df80f Release v0.2.8 2014-02-15 01:26:27 -08:00
Devon Govett
8c83de3354 Allow setting dash spacing to 0. Closes #102 2014-02-15 01:01:38 -08:00
Devon Govett
8ca8070867 Add comment about +1 2014-02-15 00:41:01 -08:00
Devon Govett
cae5d5b710 Merge branch 'master' of github.com:kkirby/pdfkit into kkirby-master 2014-02-15 00:38:09 -08:00
Bob Zoller
dd8fb58092 fix a few max call stack size exceeded errors
resolves a RangeError when finalizing documents with many images and/or many pages.
2014-02-14 11:40:53 -08:00
Devon Govett
73926bee12 Merge pull request #196 from yonishostak/master
fix issue #195 in pdfkit repo. Closes #195.
2014-02-11 12:54:18 -08:00
yonishostak
8b3cc99033 make the last commit an actually valid coffescript 2014-02-11 15:51:06 -05:00
yonishostak
0af7aefc13 fix issue #195 in pdfkit repo 2014-02-11 12:13:41 -05:00
Kyle Kirby
3904daf1b3 Fixed a bug where the xref table would have incorrect offsets.
The additional "\n" character upon the final ".join" of data wasn't taken into account. This may fix #173 and #147.
2014-01-30 18:47:52 -06:00
Devon Govett
a3d24f5858 Update list of features in readme 2014-01-18 13:27:18 -08:00
Devon Govett
18a2094657 Release 0.2.7 to npm 2014-01-18 13:22:00 -08:00
Devon Govett
a983bf4720 Make encodeWinAnsi and associated map private 2014-01-18 13:21:30 -08:00
Devon Govett
a157b466a6 Merge pull request #190 from helmuthb/dev/encoding-standardfonts
Support for latin1-special characters and euro-sign with standard fonts
2014-01-18 13:12:59 -08:00
Helmuth Breitenfellner
0d56d85a5d incorporated comments from @devongovett 2014-01-18 22:10:57 +01:00
Helmuth Breitenfellner
858e3864ab Add WinAnsiEncoding for standard fonts
When using a PDF standard font, the encoding is set to WinAnsiEncoding.
In addition, a encoding function is used to translate from UTF-8 to
WinAnsiEncoding.
2014-01-18 21:21:56 +01:00
Devon Govett
d44a8cbca6 Merge pull request #184 from Nathanaela/Invalid_Page_Size_Calc
Fixes the invalid calculation of page size in Line Wrapper.
2013-12-03 13:06:11 -08:00
Nathanael Anderson
3e158edc98 Fixes the invalid calculation of page size in Line Wrapper.
@startY + options.height will actually = the full remainder of the page, by subrtacting out a line of text it just wrapped a line of text too early as the last line of text could never fit.
2013-12-03 14:21:29 -06:00
Devon Govett
48e918803d Merge pull request #181 from bdowning/master
Fix setting text x or y to 0
2013-12-02 00:21:53 -08:00
Brian Downing
5fc69d96c8 Fix setting text x or y to 0
Because of the use of the construction "@x = x or @x" there was no way
to set x (or y) to 0, since 0 is falsy.  Fix to use separate outer tests
and unconditional assignment.
2013-12-01 21:38:38 -06:00
Devon Govett
77bcf29406 0.2.6 2013-11-14 19:38:05 -08:00
Devon Govett
f8a8f98212 Only swap bytes for PDF metadata, not for annotations. Closes #174 2013-11-14 19:37:45 -08:00
Devon Govett
b8d778b1e5 0.2.5 2013-11-09 23:24:58 -08:00
Devon Govett
27c17cf454 Fix behavior of text wrapping with x/y without width. Use options.lineBreak = false to disable linebreaking 2013-11-09 23:13:50 -08:00
Devon Govett
fe04b9a41a Reorganize 2013-11-09 23:00:59 -08:00
Devon Govett
57e50f31d3 Merge pull request #89 from shinohane/patch-1
Use Unicode on PDFObject.s for CJK metadata
2013-11-09 22:55:40 -08:00
Devon Govett
4f0402898b 0.2.4 2013-11-09 22:49:57 -08:00
Devon Govett
d2b728fdff Merge pull request #152 from Nathanaela/Text_Wrapping_Fix
Fix bug in Line_Wrapper ignoring \n in most cases.  (Causes text wrapping to be wrong)
2013-11-09 22:45:37 -08:00
Devon Govett
a7c0a63d76 Merge pull request #167 from Nathanaela/Fix_Eating_Chars
Fixes the eating of prefix characters:
2013-11-09 22:43:58 -08:00
Devon Govett
f95a68c149 Clean up, and release 0.2.3 2013-11-09 22:41:15 -08:00
Devon Govett
5ef0bd8ac3 Merge pull request #78 from wabbit/master
Added image alignment to the image fit option
2013-11-09 22:38:49 -08:00
Devon Govett
83f7baa108 Fix npm version since apparently it didn't run the prepublish hook before 2013-11-09 22:29:03 -08:00
Nathanael Anderson
e5bbe4dfce Fixes the eating of prefix characters:
;:.-/\?!
2013-10-24 12:43:25 -05:00
Devon Govett
7dda95c1a3 Update npm 2013-10-24 08:21:38 -07:00
Devon Govett
4bdc10e580 Merge pull request #166 from almost/patch-1
Have output return a binary buffer
2013-10-24 08:14:33 -07:00
Thomas Parslow
6e7b57a0d8 Have output return a binary buffer
Right now output returns a string to its callback, this means you can't just write it to a file or send it to a response as the default encoding (utf8) is incorrect. You have to manually specify binary. If instead of a string you return a binary buffer then you don't have to worry about this.

I also fixed the generation of the final string to not build the string with repeated concatenation which is O(n^2) and instead build up an array of strings then join them all at once which is O(n)
2013-10-24 09:51:52 +01:00
Nathanael Anderson
933aee7d60 Fix bug in Line_Wrapper ignoring \n in most cases. (Causes text wrapping to be wrong) 2013-08-14 09:35:30 -05:00
Devon Govett
96bba3a035 Merge pull request #119 from ef4/path-parser-fix
Fixed path parsing bug
2013-07-31 21:05:20 -07:00
Devon Govett
6e699c46f2 Merge pull request #141 from mark-hahn/jpeg-fix
critical bug fix for JPEG
2013-07-31 21:03:40 -07:00
Devon Govett
12eed6aa5f Merge pull request #117 from daxxog/pull1
Filenames OR Buffers for .image
2013-07-31 20:55:31 -07:00
Mark Hahn
4cb8edf4b2 removed DHT marker FFC4 from list of SOF markers 2013-07-04 11:40:48 -07:00
Devon Govett
c89ebd0a65 Merge pull request #135 from godmodelabs/master
make registerFont chainable
2013-06-28 20:14:14 -07:00
Julian Gruber
6775d194a1 make registerFont chainable 2013-06-28 10:51:23 +02:00
Devon Govett
c5870d2822 Release 0.2! 2013-05-17 10:27:46 -07:00
Devon Govett
2493e0c34c Add gradient support (both linear and radial). Closes #95. 2013-05-12 20:29:53 -07:00