Open lukawal-miller opened 4 years ago
Hi @lukawal-miller , can you please attach logs ?
In this example there is a case similar to yours where I attach multiple pages maybe can be of help.
@cesarvr I've tried attaching debugger to the function, but app did not stop, just crashed. And since it crashed, debugger did not work. Code below:
pdf.fromData(html, options)
.then((base) => console.log(base) )
.catch((error) => debugger )
Is there a better way to get a log for you to look at? Is there a known limit on the file size generated?
Cheers.
Look what I did:
I get my sample project and execute it using:
open platforms/iOS/Testing.xcworkspace
Once there I run the simulator and hook Safari (I'm using a Mac), then in the console I copy paste your code and got this:
Now safari is struggling to draw the resulting base64 because the content is large, so if I have to guess, your crash has to do more with an out of memory error or something similar, in that case you maybe need to treat the resulting data with careful like not printing it in the console or whatever action that may tax your device.
Here is a screen shot of the content:
Hope this helps :) Cesar.
@cesarvr Thanks for your reply. I was able to generate base64 in console (43 MB as base64 string). I've also tried to run our app on a newer device with 4GB RAM... and document got generated without app crashing. Looks like the issue has to be related to our devices since they come with 3 GB RAM or less.
@cesarvr Guessing there is nothing else we can do? Thanks.
= Is this crash happening when the promise returns ?
= or the promise never returns and the process just die ?
= Also is this Android or iOS ?
App is crashing while base64 string gets generated. So promise never returns and app just dies. We are working with Android devices.
conseguiram resolver de alguma forma? estou com o mesmo problema.
Our app is crashing while we are trying to generate quite a big PDF file.
Would you mind helping us resolve this issue @cesarvr ?