Canvas to PDF

HTML5 Canvas can be converted as two ways:

1. Canvas can be converted as image and image will be added into pdf. The pdf quality is not so good in this approach.

2. Canvas can be formatted / manipulated in JSON format and the JSON format can be converted as PDF. (PDF objects / elements can be created using the JSON object properties). PDF quality is so good because of all the objects are treated as PDF objects. After converting the canvas as pdf, Searching of the text is possible. This approach will be good for high quality printing.

Please check the demo for the pdf download for the quality of the PDF.

Sample JSON from canvas editor:


Technically,TCPDF library can be used to convert the JSON To pdf format.

also please find this sample pdf generated using the above techniques, zooming the attached pdf at any level will not affect the quality, it will be print ready high resolution pdf.

Text / Image Objects in canvas editor.

Template Editor

Converted PDF