Merge pull request #166 from almost/patch-1

Have output return a binary buffer
This commit is contained in:
Devon Govett 2013-10-24 08:14:33 -07:00
commit 4bdc10e580

View File

@ -98,11 +98,11 @@ class PDFDocument
@generateXRef out
@generateTrailer out
ret = ''
ret = []
for k in out
ret += k + '\n'
ret.push(k + '\n')
fn ret
fn new Buffer(ret.join(''),'binary')
finalize: (fn) ->
# convert strings in the info dictionary to literals
@ -168,4 +168,4 @@ class PDFDocument
toString: ->
"[object PDFDocument]"
module.exports = PDFDocument
module.exports = PDFDocument