Skip to content

Instantly share code, notes, and snippets.

Avatar

Schlameel schlameel

  • US
View GitHub Profile
@andrei-tofan
andrei-tofan / example.js
Created Jun 5, 2017
node.js writable buffer stream (pdfkit example)
View example.js
/**
* Convert PDFDocument to Base64
*/
const PDFDocument = require('pdfkit');
const stream = require('./stream');
// crate document and write stream
let doc = new PDFDocument();
let writeStream = new stream.WritableBufferStream();