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.
17 lines
297 B
CoffeeScript
17 lines
297 B
CoffeeScript
8 years ago
|
PDFDocument = require 'pdfkit'
|
||
|
fs = require 'fs'
|
||
|
|
||
8 years ago
|
make = (doc) ->
|
||
|
doc.text("Hello world")
|
||
|
doc.end()
|
||
|
|
||
|
|
||
8 years ago
|
doc = new PDFDocument({compress: no})
|
||
|
doc.pipe(fs.createWriteStream('test3.pdf'))
|
||
8 years ago
|
make doc
|
||
8 years ago
|
|
||
8 years ago
|
doc = new PDFDocument({compress: yes})
|
||
|
doc.pipe(fs.createWriteStream('test3c.pdf'))
|
||
|
make doc
|
||
8 years ago
|
|