Empty PDF after bumping to targetSDK 29
See original GitHub issueAs described on the title, one of the things we’ve noticed so after bumping the targetSDK
version of our app to SDK 29, is that it isn’t possible for us to generate a PDF using the RNHTMtoPDF library.
Has anyone else experienced this issue?
PDF file gets created on the given route wit the givenfileName
, but its content is empty.
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Environment.getExternalStorageDirectory() deprecated in API ...
I spent a whole afternoon finding out why a certain external library stopped working, as soon as I raised the targetSdk level to...
Read more >Behavior changes: apps targeting API 29+ - Android Developers
The changes listed in this document apply exclusively to apps that are targeting API 29 or higher. If your app sets targetSdkVersion to...
Read more >Release Notes - Helpshift for Android - Developer Guide
Fixed a crash which occurred when a user opens the chat screen containing an attachment message and hardware acceleration was explicitly disabled in...
Read more >Update targetSdkversion to 29 · Issue #3360 · getodk/collect
Working on #3189 we wanted to bump targetSdkversion directly to 29 but it turned out ... Then, when we're ready to target API...
Read more >Adobe AIR SDK Release Notes
Gamua-372: Changing default Android target SDK to 29 ... AIR-168: AIR content goes all white/blank after AR camera closes (Gamua-67).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, As @gundlev said, by forking the repo and copying the fix.
mWebView.loadData(mHtmlString, "text/HTML; charset=utf-8", null);
should be replaced by:mWebView.loadDataWithBaseURL(mBaseURL, mHtmlString, "text/HTML", "utf-8", null);
inandroid/src/main/java/android/print/PdfConverter.java
.then replace the
react-native-html-to-pdf
dependency in the project with your fork. e.g:npm uninstall react-native-html-to-pdf && npm install git+https://github.com/ThibaultG1/react-native-html-to-pdf
@liamjones Thanks. I’ll release a patch for v0.9 with your changes.