I want to show a pdf based on what button a user clicks. This all works, but sometimes it open the webpage, but doesnt show the PDF, just a blank screen. When this happens, I need to manually refresh the page.
I use this code to open the webpage:
const pdfUrl = `url to pdf`;
const docsUrl = `https://docs.google.com/gview?embedded=true&url=${pdfUrl}`;
await WebBrowser.openBrowserAsync(docsUrl);
I don’t want to use the url to the pdf directly, because then it downloads the pdf.
Expected result:
Broken result: