You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file canvas2pdf.min.js above is the /dist/canvas2pdf.js file
(index.js)
// Create a new PDF canvas context.constctxPdf=newPdfContext(blobStream());// draw your canvas like you would normallyctxPdf.fillStyle="yellow";ctxPdf.fillRect(100,100,100,100);// more canvas drawing, etc...// convert your PDF to a Blob and save to filectxPdf.stream.on("finish",function(){varblob=ctxPdf.stream.toBlob("application/pdf");saveAs(blob,"example.pdf",true);});ctxPdf.end();
And this is the error the browser is throwing Uncaught ReferenceError: PdfContext is not defined
Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
Hi there,
I'm trying to use this module without nodejs, but I'm getting an error telling me PdfContext is undefined. Here is my code for reference:
(index.html)
The file
canvas2pdf.min.js
above is the/dist/canvas2pdf.js
file(index.js)
And this is the error the browser is throwing
Uncaught ReferenceError: PdfContext is not defined
Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: