It worked fine on one site. Then on another site the download worked but the display did not. The line of code that does not work is:
$w("#htmlFrameForPdf").src = `https://docs.wixstatic.com/ugd/${url}?`;
I suspect that the media library address ( https://docs.wixstatic.com/ugd ) may be different on the second site.
Any thoughts?