Open ChakirBelhaj opened 5 years ago
I am experiencing the same issue and have not been able to find a fix. The workaround I'm currently going with is to select PDF when printing.
Same here.. not working.. any idea how to fix it
Facing the same issue
Have you got any way to fix it!? i am having the same issue!!
I used another package to convert the HTML to pdf "html2pdf.js": "0.8.0", but sadly the package has a lot of issues. https://www.npmjs.com/package/html2pdf.js/v/0.8.0. I honestly would recommend converting the HTML to pdf format by using a back-end library.
import * as html2pdf from "html2pdf.js";
Good luck!
and which backend library are you using!? i saw the one called html-to-pdf but it doesn't recognize thigs like line-height or font-family
There are many libraries, I have no clue which one would suit your particular use case, In my case, I used the javascript one.
Note that most back-end libraries require a license.
Try looking at https://www.dynamicpdf.com/
The export to pdf button in ReactJS-Froala editor does not work and is not displaying any errors at all.
Edit The React editor is missing the html2pdf library by default, I had to install html2pdf library and import it above my Froala-editor imports. Sadly after importing the html2pdf library, a console error occurred while trying to download the pdf file.
` jspdf.min.js:7388 Uncaught TypeError: Cannot read property 'canvas' of undefined at Object.html2pdf (jspdf.min.js:7388)