If you download the pdf document from the internet, save it to the device and try to show it inside PdfViewer, it will not be loaded on Xiaomi phones with MIUI 12.1. and above.
Users report similar issues with downloaded files on MIUI devices, here are a few discussions on the matter:
It seems that's the same reason for the PdfViewer not showing downloaded pdf files as it properly shows pdf documents added as embedded resource to the solution.
I am Lazy Loading a document in a TabViewItem on the RadTabView Control. Here are the steps.
1. My Page opens and I am on my Main Tab.
2. The user has two Bottom Menu Options, one of them is for a view of a Document.
3. The user selects the Document Tab Option, and the I fire an Async operation that Loads a Byte Array that the PDFViewer is bound to. This loads fine. The document successfully loads in the viewer.
4. The user goes back to the Main Tab
5. The user then selects the Document Tab Option again, the Byte Array is already loaded so I do not Load it again in my ViewModel. So, I am not updating the Source Property on the PDFViewer again once it is loaded. I also tried just reloading the document with the same results.
The application just crashes. My guess is the Rendering or Re-Rendering of the Pdf Document between Tab Selections and there is someting
If the document is never loaded, the app does not crash. However, once I load the document in the PDFViewer that exists on a Tab, the Application will crash if the user moves between tabs.
Stack Trace from the Native Crash Reporting from the Application Output Window.
Example of my Binding. Very simple Byte Array Binding, and out of the box example from the QSF Code. I also tried using a Stream and it does the same thing.
The pdf content is not visualized properly on UWP and iOS when the file is loaded from a stream.
Also if you try to load PDF twice on the same PDF Viewer, an exception is raised.