-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images missing after change to WKWebView #47
Comments
i am also facing this issue , any luck? |
From what i've found so far it seems some internal stuff got changed from UIWebView to WKWebView. There were some private apis at play that were facilitating the pdf export process with images in UIWebView, even though you might have been using UIMarkupTextPrintFormatter alongside UIGraphicsBeginPDFContextToData. Now by only changing the webview from UI... to WK... it seems those private apis got changed intentionally or got lost. Here's a helpful link: https://stackoverflow.com/questions/49824797/generate-pdf-from-html-in-wkwebview-with-images EDIT: Using a UIMarkupTextPrintFormatter does actually work. I tested it myself and it actually works. Safe travels, brave adventurers. |
I had no issues with images until iOS 16.4 SDK: If the app is build with Xcode 14.2, the images are present on all devices, but since Xcode 14.3, the images are only present in the PDF when not running on a device with iOS 16.4 or later. I just compared my
in the EDIT: It is still working when using |
Hello,
I suddenly changed from an old version of NDHTMLtoPDF with UIWebView to the current version with WKWebView. Then problem now is, that I'm missing the images in the pdf. Is this a bug or do I need to change something in the code?
Code for the image (the logo)
Code for creating the pdf
The text was updated successfully, but these errors were encountered: