cesarvr / pdf-generator

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

Ios - [ShareSheet] ERROR: timed out waiting to establish a connection to the ShareUI view service extension. #73

Closed hupptechnologies closed 6 years ago

hupptechnologies commented 6 years ago

Doesn't working on ios

I have tried using both method fromData and fromURL also tried both type but didn't worked at all. My code using fromUrl method:

   let options = {
        documentSize: 'A3',
        type: 'base64'
    }

   let fileUrl = "./assets/html/1.html";

cordova.plugins.pdf.fromURL(fileUrl, options).then((res)=>{
        console.log('res of pdf >>>>>>>>>',res);
}).catch((err)=>{
    console.log('export error >>>>>>>>>',err);
})

Expected behavior:

Cordova: 6.5.0 Ionic: 3.9.2 plugin-version: 2.0.1 ios-version: 11.0.1

cesarvr commented 6 years ago

To get some file from file system in iOS you need the cordova-plugin-file, also you can take a look at this example.

Cheers.

hupptechnologies commented 6 years ago

Thanks ended up using base64 data but using type share is still not working for me on ios.