cesarvr / pdf-generator

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

Loading an internal CSS not working for iOS Capacitor #143

Open ersamrow opened 1 year ago

ersamrow commented 1 year ago
let cssPath = 'assets/css/pdf.css';
    if (this.platform.is('android')) {
      cssPath = 'file:///android_asset/public/' + cssPath;
    }
    const payload = _.template(' <head><link rel="stylesheet" href="<%=css_file%>"></head><body> ' + content + '</body>');
    const options = {
      documentSize: 'A4',
      type: 'share',
      landscape: 'portrait',
      fileName: fileName
    };

It's working for Android but not iOS. Can you please help.