eKoopmans / html2pdf.js

Client-side HTML-to-PDF rendering using pure JS.
MIT License
4.05k stars 1.37k forks source link

How to make work on capacitor #321

Open mesqueeb opened 4 years ago

mesqueeb commented 4 years ago

I am trying to make it work on Capacitor. This is the snippet I try:

html2pdf().from(document.querySelector('.page-proposal-energy-simulation-graphs')).using({
  //jsPdf: {  },
  html2canvas:  { windowWidth: 974, width: 974 },
}).output('blob').then(blob => console.log(blob))

Then I wanted to try and open the blob in an in-app browser.

However, during the output() command seems to not work on Capacitor. I get this:

Unhandled Promise Rejection: undefined

image

This is during the save. At that point my capacitor screen flickers and gets refreshed as well.

FlueschPluesch commented 2 years ago

Any news on this?

OnilLekshman93 commented 1 year ago

any update on this? @FlueschPluesch @mesqueeb

Jalalkhan-Dev commented 3 weeks ago

Any update on this? @mesqueeb

mesqueeb commented 3 weeks ago

I gave up long ago lol