Closed jocelynpender closed 1 year ago
Don't know of preferred ways to embed. Personally I would just link to the pdf, optionally with the option to open a new tab:
[see this pdf](link-to-pdf){: target="_blank"}
Browsers typically render pdfs nicely and offer options to download. The user is then also not restricted by the rather narrow width of the site it is embedded in.
Is there a recommended way to embed a PDF document on a page? Ideally, a viewer would be embedded, which would allow the user to scroll through the PDF via the viewer, similar to how I've implemented an embedded Google Sheet on this page: https://atlantichabitatmodels.github.io/communityofpractice/directory/
It looks like I can use an iframe to call Google's viewer (found on this stack overflow page).
<iframe src="https://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:718px; height:700px;" frameborder="0"></iframe>
I'm wondering if there's a more Jekyll-themey way of doing this?