My client wants to display PDF files in the post, his website is powered by WordPress, although there are lots of plugins to achieve this task in this current timeframe with the latest WordPress version, I found an easy solution that is right under your nose. This blog post will cover about how to display a PDF, spreadsheet or a word file in a blog post or even a page.
In the example above, I did not much work at all to be honest with you. Upload your PDF or document to your “media” dashboard like you would do when uploading an image to a blog post.
- .pdf (Portable Document Format; Adobe Acrobat)
- .doc, .docx (Microsoft Word Document)
- .key (Apple Keynote Presentation)
- .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation)
- .odt (OpenDocument Text Document)
- .xls, .xlsx (Microsoft Excel Document)
Let me zoom in more closely for you. Make sure you select “media file” and then save changes. A link to your PDF should have been uploaded inside the post and move the link to where you want it within the post.
By using this piece of code you can easily embed PDF files into a page or post for clients, so website visitors can read the PDF document right from the page.
Code will look like a normal link, it just links to the PDF file path we saved.
<a href=”http://domain.com/wp-content/uploads/2017/05/mycar.pdf”>my car pdf</a>
Do you have any questions about this method above?
- You may be interested in: How To Convert Web Page to PDF using Web2PDF
Did you know that we offer services online.