cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
107 stars 61 forks source link

PDF preview doesn't appear in Android, it is continue spinning #145

Open darshitmaniar opened 10 months ago

darshitmaniar commented 10 months ago

Hello, Preparing preview keeps running When I try to share a PDF the print dialog has been opened but the page and save pdf button don't load on the pdf dialog box. It was working fine on iOS. I have created a new ionic Cordova project with Angular 13

downloadPDF(title?: string) { 
    const options = {
      documentSize: 'A4',
      type: 'share',
       fileName: `test.pdf`,
    };
    this.pdfGenerator
      .fromData('<html><h1>Hello World</h1></html>', options)
      .then((base64: any) => {
        alert('OK ' + base64);
      })
      .catch((error: any) => {
        alert('error ' + error);
      });
  }

Screenshot from 2023-09-04 17-34-37