I'm facing some issues with rendering pdfs on mobile view/browsers, hoping to consult if there is any workaround.
What I did
I cloned from the React Samples here. Using my own sample pdf and importing it locally in the code, I got it embed mode: SIZED_CONTAINER
to work on a responsive browser view in Chrome.
Problems Encountered
However, when I switch to a mobile view on the developer's console, the Embed API broke with an error 'PREVIEW_RENDERING_FAILED' (See attached image) enter image description here
I thought it might a chrome thing that it failed, so I loaded an emulator on Android Studio to check if I could replicate the same error, and it did. (See attached video link) https://youtube.com/shorts/qoolVAywRxQ
On another note, I've also run into a perculiar behavior when I change to a mobile dimension and refresh my page while I'm in the fullscreen mode. Upon the exit from fullscreen mode after refresh, the embedded pdf would have a fullscreen/enlarge icon on it and could only be viewed in fullscreen only. (See attached video link) https://youtu.be/AUWa4Hvq1pY
I'm not sure what is causing these behavior, but is there any way I could get it to work on a mobile browser/view?
Link to my repository