Read Offline

Read Offline example
I’m working on a plugin which allows you to download and read posts and pages offline in pdf, epub and mobi formats, and I need beta testers (please share this page with WordPress friends).

Please use the comments field below if you find bugs, typos etc.


  • Settings page (Settings->Read Offline)
  • Read Offline widget (output shown in the image above)
  • Read Offline shortcode
  • You can download a pdf, epub or mobi file containing the current post or page (you have to add the Read Offline widget to see the download links)
  • The download filename is based on the posts slug ($post->post_name)
  • Adds meta data to the file
    • Title (PDF, ePub and mobi)
    • Author (PDF, ePub and mobi)
    • Subject (mobi)
    • Publisher (ePub)
    • Identifier (uPub)
    • Source URL (ePub)
    • Language (ePub)
  • Option: Add download links to the top and bottom of a post or page.
  • Permalink support (/read-offline/”postid”/”post-name”.”type”). I’ve written a how-to add permalink to plugins guide.
  • Option: Add a custom style to the ePub and PDF file
  • Option: Google Analytics read-offline event tracking. You can find these under Content » Events in your Google Analytics reports. Assumes you’re using the Asynchronous version of Google Analytics.
  • languages/read-offline.po for easy translation.

To-do / Wish List


There are 3 ways you can add the Read Offline link

  1. At the top or bottom of each post and/or page (See Settings->Read Offline)
  2. Using the Read Offline widget
  3. Using the [readoffline] shortcode

The [readoffline] shortcode has the following parameters

  • format=”epub”, default: format=”pdf,epub,mobi”
  • text=”Read %title offline:”, default: text=””. %title% will be replaced with the post or page title
  • icononly=”true”, default=”false”


  • [readoffline] is the same as [readoffline text="" format="pdf,epub,mobi" icononly="false"]
  • [readoffline text="Download %title%:" format="epub"]


The plugin is using the following libraries

  • Epub , License: GNU LGPL, Attribution required for commercial implementations, requested for everything else.
  • Zip, License: GNU LGPL, Attribution required for commercial implementations, requested for everything else.
  • phpMobi, License: Apache license (version 2.0)
  • mpdf, License: GNU General Public License version 2

The plugin is using the following icons



  • Fixed a bug in permalinks that gave 404 for blogs in a subdirectory. Also removed code that gave error when downloading an ePub.



  • Minor bug fix


  • Added the option to add custom css to PDF


  • In Settings->Read Offline, added the option to add custom css to EPub
  • Added languages/read-offline.po for easy translation.




  • Fix typo in download.php, was including  “”,  correct is “”


  • Bugfix, v0.1.0 will give you “gray screen of death”, so please upgrade to this version


  • Added the Read Offline shortcode
  • Added, in Settings->Read Offline, option to add Read Offline to top and/or bottom of post and page


  • Filename based on the posts slug
  • Added meta data


  • Initial release

77 thoughts on “Read Offline

  1. Jerry Lasky

    When I use Read Offline with the Twenty Eleven theme, the print icons appear at the top of ALL pages (I selected top of page as the location in settings) but not at the top of posts. Is there a way to have 1) The print icons appear only on pages I select and 2) Also appear on posts I select. If there is code I need to modify could you provide the code and specify the (child) files that need to be edited. Thanks, Jerry

  2. Rezo


    great work, thanks for your plugin.

    Question 1: how can i use the plugin as php function in my wordpress template?

    Question 2: how can i let plugin to use the print.css version and not all on the page or post? I have on some posts slider &/or forms (contact form), i would plugin dosn’t add these all to pdf document.

    Question 3: Is there a pro version?

    Thank you for answer

    1. PerS Post author

      You can run plugin the in your template (it must be activated first) by doing:

      There’s not support for styling yet and there’s no pro version yet.

  3. Helene


    With the new versions of Cbox theme (1.0.5 and 1.0.6), the read later dowload pdf line appears in the caption of the slides in the slider. Increasing the width of the caption banner see here:

    This did not occur with Cbox 1.0.4.

    Is there anything to do on your end? The devs at Cbox suggest I deactivate your plugin…


  4. Cédric


    Impressive plugin with a lot of quality. Congrats, and thank you !
    Two questions please :
    - I didn’t understand how to use meta. Could you explain a bit more please? Could it be used to have some king of template (ex: always have site URL from which the pdf has been created. As I understand, PDF are a bit anonymous right now).
    - Is there a quick way to make the plugin compliant with custom posts? My site has plenty and I can’t generate PDF for them ;-(

    Thank you very much once again for the quality of plugin,

    1. Per Søderlind Post author

      Hi Cédric,

      I’m working on the next version which will support custom post types + meta information. Not sure when it will be ready.

  5. Michael

    Hi, I can’t get the correct chinese font when i export the pdf file. Would you mind telling me the way to make it right?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">