PDF notes
How to render pdfs
To render PDF inside the page with Mozilla’s PDF.js
Use
<iframe
title =”PDF”
src={/pdfjs-2.8.335-dist/web/viewer.html?file=${DOCUMENT_URL}
}
width=”100%”
height=”700px”>
</iframe>
Alternatively
<object data={“scripts/pdfjs-2.8.335-dist/web/viewer.html?file=/_files/blah.pdf”} type=”application/pdf” width=”100%” height=”678px”
<iframe src={“scripts/pdfjs-2.8.335-dist/web/viewer.html?file=/_files/blah.pdf”} width=”100%” height=”678px”
<p>This browser does not support PDF!</p>
</iframe> </object>