mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Merge pull request #166 from almost/patch-1
Have output return a binary buffer
This commit is contained in:
commit
4bdc10e580
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user