Show PDF file in wordpress blog or site

Many people want to show there pdf files in wordpress blog. PDF is really popular format for showing the document with graphics and text and design and graphs. Without loosing the quality of text and graphics if we need to show the content then PDF is really nice format.
In business world for presentation purpose all people mostly use the PDF document. Some wp developers asked about showing the pdf in wordpress.

For without any issue if you want to show the PDF document then you need to just open functions.php file and put following code in that file.
Following code I written for creating the shortcode in wordpress

function pdflink($attr, $content) {
return '<a href="' . $attr['href'] . '">'.$content.'</a>';
add_shortcode('pdf', 'pdflink');

For showing link of PDF file in article or post you need add the following lines in the article.

[pdf href=""]View PDF[/pdf]

Note: Upload the PDF file to your wordpress and then get the path of PDF file and then put above lines in article.
Change the path as you required.
Above code will create pdf link for your pdf document in your site.

If you does not want to create PDF link in your site and you want to show the pdf doc in your site then use following code.

function pdfshow($attr, $content) {
return '<iframe src="'.$attr['href'] .'&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>';
add_shortcode('pdfshow', 'pdfshow');

For showing the PDF file in article or post you need add the following lines in the article.

[pdfshow href=""]View PDF[/pdf]

We are looking for pdf in wordpress post, wordpress pdf tutorial,  wordpress tutorial, wordpress documentation pdf, wordpress ebook pdf, wordpress book, wordpress ppt, wordpress tutorial for beginners this for wordpress. Here we can add the pdf support using my code in your wordpress sites.

You may like following Articles!

  • Travel Deals

    Man I definetly adore your write-up and it has been too superb hence I am definetly going to save. One thing to say the Superb research you have done is greatly exceptional . No one does that additional research these days? Well Done ! Just one more suggestion to you is that you shouldinstall any Translator Application for your Worldwide Audience :)

  • Isiah Calligan

    Hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. keep up the good work.

  • Laura Lough

    Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?

  • Rory Culotta

    I’ve just started off a blog, the knowledge you give on this site has aided me extremely. Thank you for all your time & work.

  • asd

    wow, how many fake comments. lame. at least lrn2english properly. “If you does not want”, really? amateur.

  • J0ReL

    Wow, houes of searching and finally i got it to work on my custom theme thanks to you. Youre a life saver. Cheers!

  • Ray Vasri

    Hi. This service here allows you to easily and effectively edit, upload or download fillable PDF forms.

    You can fill out PDF form, save it, fax it, and email it.