См. https://github.com/joshua-gould/canvas2pdf . Эта библиотека создает PDF-представление вашего элемента canvas, в отличие от других предлагаемых решений, которые вставляют изображение в документ PDF.
//Create a new PDF canvas context.
var ctx = new canvas2pdf.Context(blobStream());
//draw your canvas like you would normally
ctx.fillStyle='yellow';
ctx.fillRect(100,100,100,100);
// more canvas drawing, etc...
//convert your PDF to a Blob and save to file
ctx.stream.on('finish', function () {
var blob = ctx.stream.toBlob('application/pdf');
saveAs(blob, 'example.pdf', true);
});
ctx.end();