I’m using the answer by batfan to this seemingly famous SO question: Recommended way to embed PDF in HTML?
I inserted the following into my HTML:
<embed src="/pdf/3" height="1600" width="1600" type="application/pdf">
This does not work as intended: The PDF title shows correctly and the viewer loads but no PDF is shown. When I inspect the blank PDF viewer I see the following error:
Uncaught TypeError: Cannot read property 'x' of undefined
at Viewport.getPageInsetDimensions (viewport.js:1161)
at Viewport.getPageScreenRect (viewport.js:1185)
at PDFViewer.viewportChanged_ (pdf_viewer.js:1044)
at Viewport.viewportChangedCallback_ (pdf_viewer.js:254)
at Viewport.updateViewport_ (viewport.js:398)
at Viewport.resize_ (viewport.js:425)
at viewport.js:1149
at Viewport.mightZoom_ (viewport.js:509)
at Viewport.setDocumentDimensions (viewport.js:1138)
at PDFViewer.setDocumentDimensions_ (pdf_viewer.js:1264)
Tested in Chrome and Firefox. Any idea?