devongovett/pdfkit — Issue #50: Blank Document
Author: CodeWarriorAQ
Created: 2011-11-22 01:34:11+00:00
State: open

In Javascript, not coffee:

```javascript
PDFDocument = require('pdfkit');
doc = new PDFDocument();

// register and use a font, set the font size, and render some text
doc.registerFont('hn', __dirname + '/public/fonts/HelveticaNeue.ttf');
doc.registerFont('hnl', __dirname + '/public/fonts/HelveticaNeueLt.ttf');
doc.font('hn')
.fontSize(25)
.text('Some text with an embedded font!', 100, 100);

// Add another page
doc.addPage()
.fontSize(25)
.text('Here is some vector graphics...', 100, 100);

// Write the PDF file to disk
doc.write('output.pdf');
```

Where's the problem?