DEV Community

Discussion on: How to embed a PDF file in a dev.to post?

Collapse
 
leonelngande profile image
Leonel Elimpe

I think I did.., is this what you are referring to:

<object data="https://www.leonelngande.com/uploads/economics-gce-advanced-level-paper-2-2015.pdf" type="application/pdf" width="700px" height="700px">
    <embed src="https://www.leonelngande.com/uploads/economics-gce-advanced-level-paper-2-2015.pdf"></embed>
        <p>This browser does not support PDFs. Please download the PDF to view it: <a href="https://www.leonelngande.com/uploads/economics-gce-advanced-level-paper-2-2015.pdf">Download PDF</a>.</p>
    </embed>
</object>

Looking at the <object> tag's attributes you can see type="application/pdf".