Home > other >  Print webpage with canvas content
Print webpage with canvas content

Time:10-24

I have a tool that allows you to assemble reports generated with fabricjs.

We are trying to convert those reports that currently work on the web to pdf, using the sejda.com tool

The problem with sejda is that it has a generation time limit of 1:50 secs. After that time, the web page returns an error, and we have reports that are taking more than 1:50 seconds to generate completely.

I'm looking for other options, but most don't interpret the content in HTML5, the page comes out blank.

I have tried with html2pdf, javascript2pdf, and a dozen web pages that send the url and try to print the document without success as blank pages.

Is there any solution to our problem? We have been investigating this for months. One of them is to improve the load times of the reports, but it is a complex development due to how it is done.

CodePudding user response:

To solve this I converted the PDF to PNG with PDF.js and stored toDataURL, then retreived the PNG image fromURL and set as background.

or this link can help you : Load PDF into fabricjs canvas

CodePudding user response:

We have finally decided to opt for the caching of the reports.

Now everything works correctly

  • Related