christopherdro / react-native-html-to-pdf

Convert html strings to PDF documents using React Native
MIT License
434 stars 264 forks source link

Error occurred generating the pdf #265

Open websoptimization opened 2 years ago

websoptimization commented 2 years ago

Hi,

I am trying to generate pdf from html content but i'm getting this error in catch block

[Error: Please retry, Error occurred generating the pdf]

Here, i attached my class file htmlToPdf.js.zip

OS Android

Environment "react-native-html-to-pdf": "^0.12.0", "react": "17.0.2", "react-native": "0.65.1"

GuoMeng6 commented 2 years ago

+1 I also encountered this problem, is there any one can help how to fix it?

mk04366 commented 1 year ago

Same issue here. @christopherdro Can we get some help on this? Not sure if this is a memory issue but this occurs randomly and forces the app to crash. Thanks!

Youmir commented 1 year ago

Please retry, Error occurred generating the pdf]

Did you find any workaround ?

BraveEvidence commented 1 year ago

This will help https://www.youtube.com/watch?v=4CBUXv8d0I0

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

liamjones commented 1 year ago

We've had issues with this on Android too. We dug into it quite a bit and, from what we could see, it was failing within Android itself inside the PrintDocumentAdapter's code, not this module. Unfortunately, the OS doesn't provide any details about why it failed. Seems to be somewhat intermittent too - it can fail on a device repeatedly one day and then work on a different day.

heart2friend commented 1 year ago

Any solution to this problem I am also facing same issue. Getting below error. It failing when trying to embed images.

Error: Please retry, Error occurred generating the pdf at Object.promiseMethodWrapper [as convert] (\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:105) at eval (VM7 src\helpers\deliveryReceipt.bundle:34) at Generator.next () at asyncGeneratorStep (\node_modules\@babel\runtime\helpers\asyncToGenerator.js:3) at _next (\node_modules\@babel\runtime\helpers\asyncToGenerator.js:22) at \node_modules\@babel\runtime\helpers\asyncToGenerator.js:27 at tryCallTwo (\node_modules\promise\setimmediate\core.js:45) at doResolve (\node_modules\promise\setimmediate\core.js:200) at new Promise (\node_modules\promise\setimmediate\core.js:66) at \node_modules\@babel\runtime\helpers\asyncToGenerator.js:19

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.