I have a page with an HTML element and iframe that displays a PDF that is stored in Google Cloud Storage using the Google Drive PDF viewer. Half the time the iframe is blank and I need to refresh the page for it to show up. The url of the pdf comes from a collection fetched on the page load.
How do I go about figuring out why the contents aren’t loading? Is there something I can add to a workflow on page load that would help?
Here is an example of the code:
<iframe src="https://docs.google.com/viewer?url=https://storage.googleapis.com/cdn.irrigationcheckups.com/63efc9e4-05a2-4fbb-b95f-6fa1e319eb73/reports/1780-1722555154187.pdf&embedded=true" style="width:100%; height:100%;"></iframe>