I like to show local Pdf files from the bundle on iOS. The fuse webview is not working in that scenario.
I try two approaches following the native controls implementation sample:
native iOS UIWebView with bundle path to pdf
native iOS Quick Look Framework
The Quick Look Framework needs an UINavigationController or an UIViewController.
Both are hostet on a Fuse LeafView.
What kind of control is the LeafView on iOS? And is there a handle to it (self) (like the Handle property for the hosted control)?
This handle to the LeafView could then be used to attach the QLPreviewController like this:
i’ve a working solution to show a local pdf in fuse using webview, you need to retrieve your local pdf NSURL as string and pass it to the webview using URL interface.
@prince: Yes, I already studied your code. From my understanding you don’t need not to convert your pdf to a file. You can use WebView’s data property to show the pdf.
In my case I deliver the pdf files with the app bundle. The file protocol (‘file://’) is unfortunately not working. I assume security reasons. So I created the UIWebView in a LeafView and try to open the pdf like this
You are telling that the file protocol ('file://') is not working but the code you try to implement use this protocol.
if you can print your targetURL you will see that.
The process i used to display the pdf with the fuse webview is exactly the same you try to implement right now (exactly the same).
Please post the full code , maybe it will be more easy to help like this.
If you telling Fuse to iOS bundle a file it’s copied to Resources/data with the filename and an id like this file-c2230a48.pdf. There is a file named bundle in this directory which translate the filenames like this:
Custom Control:file.pdf:file-c2230a48.pdf
With this information you can create a valid bundle path like this:
@Emptyfortress: what you’re asking is not directly related to the PDF discussion in this thread. Please make a new forum post with all the details, including a complete, ready-to-run reproduction.