Dendron doesn't have a built-in way to do this, I ...
# chat
s
Dendron doesn't have a built-in way to do this, I think, but you can put raw HTML in markdown. Could try this: - `iframe`: https://www.w3docs.com/snippets/html/how-to-embed-pdf-in-html.html - or `embed`: https://www.w3docs.com/learn-html/html-embed-tag.html I tested this, and it won't render the embedded PDF in the Dendron toggle preview or Markdown preview but it will embed and appear in the published site contents. - Add pdf to
notes/assets/*
- Reference in your note like this:
Copy code
html
<iframe src="/assets/pdf-example.pdf" width="100%" height="500px"></iframe>
Embed example instead of iframe:
Copy code
html
<embed type="application/pdf" src="/assets/pdf-example.pdf" width="100%" height="500px" title="Example PDF">
Alternately, if wanting it to not appear with PDF settings/buttons for things like downloading, can embed with
#toolbar=0
appended to end of PDF link (depending on browser, may or may not work differently - Chromium for me seemed to recognize that it should render differently for me, but not Firefox):
Copy code
html
<iframe src="/assets/pdf-example.pdf#toolbar=0" width="100%" height="500px"></iframe>
I believe
src
can also be a url to a PDF hosted elsewhere, in case not in local vault, too