Problem showing pdf in web app with Safari

The code below displays a static pdf in an HTMLViewer in a container on a web page. In Firefox it looks perfect. In Safari, it is a big gray box, and in Chrome it shows a thumbnail of the two pages. You can see it at https://catalog.ezmeter.net/#60.

Session.PDFFolderItem = GetFolderItem(“/home/ezmete5/ezmeter.net/pdfs/PwrSuiteQuickStart.pdf”)
if Session.PDFFolderItem.Exists then
Var dat() As String
dat.Append(“”)
dat.Append(“”)
dat.Append(“<object data=”“data:application/pdf;base64,”)
dat.Append(Session.PDFFolderItem.Base64Data)
dat.Append(“”" type=““application/pdf”” width=““100%”” height=““100%””>“)
dat.Append(”“)
dat.Append(”“)
dat.Append(”")
var sourcePage As String = String.FromArray(dat, EndOfLine)
HTMLViewer1.LoadHTML(sourcePage)
Else
MainPage.MsgDialog.laText.Text = “PDF file is missing”
MainPage.MsgDialog.Show
end If

I can live with the Chrome version, but I would certainly appreciate help getting Safari to work better.

Each browser has their own PDF viewer.

You can change the Chrome view by clicking the “hamburger” menu on the left:
image

This is what I see using Safari, but I’m using an older version because I’m using older macOS:


This is what it looks like on a year old, but up to date, M1.

I tested with Mojave and Safari Version 14.1.2 (14611.3.10.1.7)

I restarted Safari and it works fine now. No idea what caused it.