Working with PDFs or other files can sometimes be a bit tricky, especially when the WKWebView on iOS handles stuff differently or you only get some binary data from an API. There are a many things that can go wrong, but let’s take a look at an easy way to open and display PDFs with Ionic.
In this Quick Win we will handle both cases: Open a PDF that exists in the assets folder of our app and also downloading and displaying data from anywhere on the web as a file to our device.
This is how the final result of our opened PDF will later look like on a device!
The full quick win with snippets is only available to Ionic Academy members.
Join now for
- Unlimited access to all quick wins
- Library of 40+ step-by-step video courses
- Support for Ionic questions via Slack & private community