Inserting my pdf in my blogs

前端 未结 1 1127
野的像风
野的像风 2021-02-09 18:09

I have a posts page which stores every individual blog. And each blog has a pdf file. I can upload the pdf via the blog page but when I execute my code through the for-loop on p

相关标签:
1条回答
  • 2021-02-09 18:59

    HTML5 <object> element can embed PDFs in a page without an external library.

    <object data="the.pdf" width="1000" height="1000" type='application/pdf'/>

    Just replace "the.pdf" with your file document path with Jekyll syntax.

    e.g.
    <object data="{{ post.file_document_path }}" width="1000" height="1000" type='application/pdf'/>

    0 讨论(0)
提交回复
热议问题