Devon Govett
b381bd5b05
npm ignore docs
2014-02-18 00:36:43 -08:00
Devon Govett
3c79667337
Add dev dependencies for generator script
2014-02-18 00:34:08 -08:00
Devon Govett
82dd9fc7b7
Update readme with link to new pdf guide
2014-02-18 00:24:31 -08:00
Devon Govett
7825ed41dd
Override continued link in doc generator
2014-02-18 00:12:35 -08:00
Devon Govett
a5a9ac4da8
Release 0.4.1
2014-02-18 00:01:11 -08:00
Devon Govett
e11a800af3
Add new self-generating guide
...
Takes Literate CoffeeScript (Markdown) files and generates a PDF. Includes syntax highlighting for the examples, and even runs them to show the results inline. Good example of new rich text features. Eventually, the website will be generated from the same Markdown files.
2014-02-17 23:43:22 -08:00
Devon Govett
a0901c75a0
Make sure we use global.setImmediate
2014-02-17 23:20:32 -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
415d5a371a
Reset continuedX if there is more than one line
2014-02-17 13:53:39 -08:00
Devon Govett
7fdc3b8d14
Fix for multiple continuations on the same line
2014-02-17 13:35:49 -08:00
Devon Govett
d5374d6c58
Release v0.4.0
2014-02-17 02:35:55 -08:00
Devon Govett
3f15f761e2
Calculate lineWidth of underline/strike based on font size
2014-02-17 02:34:27 -08:00
Devon Govett
fae1b4a208
Update example to use link and underline options instead of annotations
2014-02-17 02:28:18 -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
Devon Govett
00c6dabf3c
Stop wrapping text after filling specified height, and add ellipsis option. Fixes #149 .
...
No longer makes new pages after user specified heights, but still does so if no height is given (page edge by default). This works with multiple columns too. It will fill the columns in the horizontal and vertical space provided and then stop, rather than going to a new page.
Also adds the `ellipsis` option which can be used to append an ellipsis character like `…` to the end of the cut off text. If you set `ellipsis: true`, it will use the default ellipsis character, but you can also set the option to any string you want to use.
2014-02-16 20:08:19 -08:00
Devon Govett
25c0348755
Fix character width calculations ( #185 , #169 )
...
Follows TTF hmtx rules for missing entries, and encodes WinAnsi first for builtin fonts.
2014-02-16 19:46:35 -08:00
Devon Govett
5b1f030329
Move WinAnsi encoding to AFMFont class
2014-02-16 19:43:25 -08:00
Devon Govett
087f3f4aca
Reset the X position to the starting X after line wrapping is done (unless continued)
2014-02-16 18:33:39 -08:00
Devon Govett
da593f077f
Force break words that are longer than the entire line into pieces. Fixes #159 .
2014-02-16 15:55:41 -08:00
Devon Govett
630bfd74a6
Make sure we don't divide by zero when calculating justification word spacing
2014-02-16 15:54:42 -08:00
Devon Govett
5a74677c66
Store continuedX on the line wrapper instead of the document, since the line wrapper is now reused
2014-02-16 14:48:40 -08:00
Devon Govett
7fafa309b8
Use the same line wrapper instance when text is continued, fixes multicolumns
2014-02-16 14:41:26 -08:00
Devon Govett
50b6bab177
Make sure we don't pass the maximum Y position
2014-02-16 13:17:45 -08:00
Devon Govett
b0de8975f9
Fix justification of embedded TTF fonts. Closes #52 .
...
Encodes each word separately instead of relying on Tw operator, which only supports character code 32, which isn't used by embedded fonts.
Still to do: proper unicode word breaking with support for non-space separated languages.
2014-02-16 13:10:18 -08:00
Devon Govett
670bb09bf7
Reset X position to start on new page (fix for columns)
2014-02-16 13:07:24 -08:00
Devon Govett
ebeca3c680
Add continued option to text so that text with inline styles can be created. Closes #60 , #180 , #189 .
...
The following example adds text with three sections (part1, part2, part3) in different fonts and colors.
doc.font('Helvetica', 13)
.text(part1, 100, 300, { continued: yes, indent: 50 })
.fillColor('red')
.text(part2, { indent: 50, continued: yes })
.font('Times', 13)
.fillColor('green')
.text(part3)
2014-02-16 11:56:31 -08:00
Devon Govett
9d22de6068
Fix textWidth
2014-02-16 11:52:10 -08:00
Devon Govett
abc871feda
Fix indent
2014-02-16 11:51:46 -08:00
Devon Govett
4b3d2c9e30
Save the fill color and restore it after the line wrapper makes a new page
2014-02-16 11:50:59 -08:00
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