Show pdf image in markdown

Is it possible? Everything that I do Google leads me to convert markdowns to PDF. But I want to display the PDF image in the markdown file. This is my example:

![hustlin_erd](erd.pdf) 

If I use a regular image, it works fine. I also know about converting PDF to image.

+12
source share
2 answers

Markdown itself has no mechanism for embedding PDF. However, Markdown accepts raw HTML as input and skips it unchanged. So, the question you want to ask is: how would you embed a PDF in HTML? In other words, what HTML code can I use to let the browser display the PDF file embedded in the HTML page? You would simply include this HTML in your Markdown document.

You can find many suggestions in answering the question: Recommended way to embed PDF in HTML? , For example, this answer provides a good solution with a fallback for older browsers (all merit relates to Suneel Omrey ):

 <object data="http://yoursite.com/the.pdf" type="application/pdf" width="700px" height="700px"> <embed src="http://yoursite.com/the.pdf"> <p>This browser does not support PDFs. Please download the PDF to view it: <a href="http://yoursite.com/the.pdf">Download PDF</a>.</p> </embed> </object> 
+19
source

I still do not understand ...

I have a PDF link from Dropbox (I also tried Google Drive) Links (same picture): https://www.dropbox.com/s/a1hdh6vlcoknwsb/software_achitecture.pdf

https://drive.google.com/open?id=1SFAAmHxWcK9QbVybjVY4_jMYTsLnWHn1

Code

 <object data="https://www.dropbox.com/s/a1hdh6vlcoknwsb/software_achitecture.pdf?dl=0" type="application/pdf" width="700px" height="700px"> <embed src="https://www.dropbox.com/s/a1hdh6vlcoknwsb/software_achitecture.pdf?dl=0"> <p>This browser does not support PDFs. Please download the PDF to view it: <a href="https://www.dropbox.com/s/a1hdh6vlcoknwsb/software_achitecture.pdf?dl=0">Download PDF</a>.</p> </embed> </object> 

what am I doing wrong?

0
source

Source: https://habr.com/ru/post/1257460/


All Articles