WP Post to PDF

Howdy,

Since you are here, I assume you have already installed WP Post to PDF in your WordPress blog. If not, don’t worry, it’s not all over yet.

It’s pretty easy to install,

  1. Download it from http://wordpress.org/extend/plugins/wp-post-to-pdf/
  2. Upload ‘wp-post-to-pdf’ directory to ‘/wp-content/plugins/’ directory of WordPress
  3. Activate plugin through the ‘Plugins’ menu in WordPress

Simple, isn’t it. Now what’s left is configuration part and surprisingly it’s easy too :).

Once you activate the plugin, You can see ‘WP Post to PDF’ link in settings tab of WordPress admin area. Clicking that link will load configuration page as per following image.

WP Post to PDF configuration page

WP Post to PDF options can be divided in three major groups. We will discuss all in brief one by one.

Accessibility Options

WP Post to PDF accessibilty options

There are three options which fall in this category.

  1. Non Public Only: Check it if you want to allow only logged in users to download PDF file.
  2. Only on Single: Check it if you don’t want to display PDF icon on your front-page, this is the page where all your recent blog entries are listed.
  3. Exclude/Include: This option let you exclude/include certain pages/posts exclusively. Provide ID of page/post, separated by comma (,), and select whether you want to exclude/include those post/page. To use PDF download on all page/post, tick “Exclude Following” and leave textbox empty. If you don’t know how to find post/page ID, see this http://www.techtrot.com/wordpress-page-id/

Presentation Options

WP Post to PDF presentation options

There are two options which fall in this category.

  1. Icon Position: Select position where you want to display PDF icon.
    Available options are

    1. Before: Display before the post content
    2. After: Display after the post content
    3. Before and After: Display before and after post content
    4. Manual: Plugin will not display Icon anywhere, You have to use following function within your template file to display icon where you want
      <?php if (function_exists("wpptopdf_display_icon")) echo wpptopdf_display_icon();?>
  2. PDF Download Link: Provide HTML content you want to use as PDF download link. You can write any HTML content. To display pretty PDF icon as it was in earlier version, use the code provided just below the “PDF Download Link” Text field on plugin settings page.

PDF Formatting Options

WP Post to PDF  - PDF Formatting Options

There are eight options which fall in this category.

  1. Other Plugins: Check this if you want to accommodate changes applied by other plugins at runtime into PDF.
  2. Process Shortcodes: Check this if you want to process short codes and display its output in generated PDF file.
  3. Header Logo Image: When you activate plugin, It will place image named ‘wp-post-to-pdf-logo.png’ in ‘‘/wp-content/uploads’ directory. Replace it with your desired one.
  4. Header Font: Set font type you want to use in header text
  5. Header Font Size: Set font size for the header text
  6. Footer Font: Set font type you want to use in footer text
  7. Footer Font Size: Set font size for the footer text
  8. Content Font: Set font type you want to use in main content text
  9. Content Font Size: Set font size for the main content text

Beware that the Arial unicode font is not displayed correctly by all PDF viewers. Ubuntu’s default document viewer displays empty pages, but xpdf displays okay, except for some Cyrillic texts.

PDF icon you see in right corner of this post is the demonstration of this plugin.

Feel free to click on it and download this post as PDF.

—————————————————————————-

Thanks Marcel for your valuable efforts on resolving some issues and SEO tips.

Tags: , , , , ,

254 Responses to “WP Post to PDF”

  1. Kris
    August 7, 2012 at 6:11 pm #

    Neerav has done custom plugins for me in the past and is very good. I would highly recommend him if anyone wants this plugin or others to be customized.

    He is very reliable.

  2. Gopi
    May 28, 2012 at 8:48 am #

    Hi Team,

    Still I am waiting for you reply. I am getting continuously the error as Fatal error: Call to undefined function has_post_thumbnail() in /home/rcgopi/public_html/wp-content/plugins/wp-post-to-pdf/wp-post-to-pdf.php on line 321.

    If you couldn’t reply then let me know I will take out that plug-in.

    Regards

    Gopi

    • Neerav
      May 28, 2012 at 8:58 am #

      Hi Gopi,

      Your theme does not have featured image support and yet you have selected ‘Dispaly Featured Image’ ( check in PDF Formatting Options of WP Post to PDF settings ) hence the error.

      Regards,
      Neerav

  3. Jason Salmon
    May 10, 2012 at 4:26 pm #

    Hi Neerav,

    You plugin is great apart from one thing. Is it possible to use it for custom post types? In the setting i can only see posts and pages.

    Thanks
    Jason

    • Neerav
      May 19, 2012 at 5:51 am #

      Hi Jason,

      Latest version of plugin has support for custom post type.

      Regards,
      Neerav

  4. Vyacheslav
    April 26, 2012 at 8:49 am #

    PROBLEM: empty page where html should be. It’s have only HEADE and footer. So problem solved an “generate_pdf_file()” function BEFORE call “writeHTML” replace double quote. $html = str_replace(‘”‘,’\”‘,$html);
    It helps for me. Keep your 2 hours ;)

    • Vyacheslav
      April 26, 2012 at 9:17 am #

      ANOTHER PROBLEM IS  

      $post->post_content = str_replace(” “,””,$post->post_content);
      $html .= html_entity_decode($post->post_content, ENT_QUOTES, ‘UTF-8′);

      $dom = new simple_html_dom();

      • Vyacheslav
        April 26, 2012 at 9:18 am #

        str_replace(“ ”,””,$post->post_content);
        cuted tags:
        str_replace(” & N B S P ; “,””,$post->post_content);

      • Vyacheslav
        April 26, 2012 at 9:57 am #

        AND ONE MORE

        anywere you use $fileName = $post->post_name . ‘.pdf’;
        you should clear “post_name”
        I work with FR so problem were “é” symbols etc.

        • Neerav
          April 30, 2012 at 5:56 am #

          Hi Vyacheslav,

          Thanks for posting your findings here. It’ll help many people.

          I highly appreciate your efforts, keep up the good work.

          Regards,
          Neerav

  5. Peter
    April 23, 2012 at 9:20 am #

    Hello Neerav,

    thanks for the plugin it is exactly what I need for my site.
    But i have small problem. The plugin does not generate my Polish characters. There is a solution to my problem?

    Please help me!

    Regards,
    Peter

    • Neerav
      April 30, 2012 at 5:58 am #

      Hi Pete,

      Please try ‘Arial Unicode’ font for content. That might solve your problem.

      Regards,
      Neerav

  6. mrugesh shah
    April 20, 2012 at 10:17 am #

    hello,

    I am editor of http://www.readgujarati.com site.

    It is in Gujarati (one of the indian) language.

    I tried installing your plugin ‘wp-post-to-pdf’ but it is not showing me gujarati text. it is showing me just dots. I have face same situation with many plugins.

    Is there any solution for that ?
    can u help me ?

    thanking you

    from :
    mrugesh shah

    • Neerav
      April 20, 2012 at 6:57 pm #

      Hi Mrugesh,

      I am so surprised receiving message from the editor of blog I read almost everyday!

      Since Gujarati is Unicode font, you should try after setting content font to ‘Arial Unicode’ one in ‘WP Post to PDF’ settings page.

      I hope that will solve your issue. I’ll be happy to assist you further if it does not solve your issue.

      Regards,
      Neerav

  7. Andrew Paterson
    April 20, 2012 at 9:29 am #

    Hi Neerav

    Thanks for the plugin it is exactly what I need for my site.

    However, it worked perfectly on my test site and downloaded the PDF, but when I copied the exact same files to my live site I got a time out message:

    Unavailable
    Site temporarily unavailable.
    Connection timed out – please try again.

    Test site (works fine)
    http://www.curvysupermodels.com.php5-20.dfw1-2.websitetestlink.com/?page_id=2837&preview=true&preview_id=2837&preview_nonce=8d6ef08b31

    Live site (time out issues)
    http://www.12plusuk.com/?page_id=2878

    I’m not an expert in php and servers, but was wondering if you can suggest what might be stopping the creation of the PDF and the time-out?

    I really don’t want to use other PDF plugins as yours offers by far the best layout and functionality.

    Thanks in advance.

    Andrew

    • Neerav
      April 20, 2012 at 9:40 am #

      Hello Andrew,

      You may need to increase memory limit of your server. 128M will be enough unless you are adding huge image files to PDF. That will solve your issue.

      Ask your hosting provider if you don’t know how to do it. Let me know if does not work after that as well.

      Regards,
      Neerav

Leave a Reply

You must be logged in to post a comment.