You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
485 B
CoffeeScript
27 lines
485 B
CoffeeScript
PDFDocument = require 'pdfkit'
|
|
fs = require 'fs'
|
|
|
|
make = (doc) ->
|
|
doc.text('Page 1')
|
|
.addPage()
|
|
.text('Page 2')
|
|
.addPage()
|
|
.text('Page 3')
|
|
.addPage()
|
|
.text('Page 4')
|
|
.addPage()
|
|
.text('Page 5')
|
|
.addPage()
|
|
.text('Page 6')
|
|
|
|
doc.end()
|
|
|
|
doc = new PDFDocument({compress: no})
|
|
doc.pipe(fs.createWriteStream('test6.pdf'))
|
|
make doc
|
|
|
|
doc = new PDFDocument({compress: yes})
|
|
doc.pipe(fs.createWriteStream('test6c.pdf'))
|
|
make doc
|
|
|