Skip to content

Instantly share code, notes, and snippets.

View schlameel's full-sized avatar

Schlameel schlameel

  • US
View GitHub Profile
@andrei-tofan
andrei-tofan / example.js
Last active February 29, 2024 23:59
node.js writable buffer stream (pdfkit example)
/**
* 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();