cesarvr / pdf-generator

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

iOS 17 crash #147

Closed kirtipriya closed 1 year ago

kirtipriya commented 1 year ago

Plugin : cordova-pdf-generator 2.0.8 "PDFGenerator" Ionic 3 application - iPad app - supports only landscape mode App plist : Supported interface orientations (iPad) : Landscape (left home button) , Landscape (right home button)

Cordova pdf plugin code :

 cordova.plugins.pdf.htmlToPDF({
        data: htmlContent,
        documentSize: "A4",
        **landscape: "portrait",**
        type: "base64",
        footer: footerContext
      },
        (sucess) => {
          console.log('sucess: ', sucess);
          cordova.plugins.printer.print('base64://' + sucess);
        },
        (error) => console.log('error:', error));

Error : App crashes with error : *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [UIPrintPanelNavigationController shouldAutorotate] is returning YES'

This error was not present in prior iPad OS versions Can you help here