Per Søderlind

I code for fun


Read Offline

19.1.2015: v 0.2.0 is avaliable at GitHub, please read the changelog prior to installing this version. 


Please report issues at



  • Add download links to the top and bottom of a post or page (configurable in Read Offline->General Options)
  • You can download a PDF, ePub or mobi file containing the current post or page, or you can print the post / page.
  • The download filename is based on the posts slug ($post->post_name)
  • Adds meta data to the file
    • Title, Author, Date, Copyright message etc.
  • PDF features (set in Read Offline->PDF)
    • Paper formats (A0 – A10, B0 – B10, C0 – C10, 4A0, 2A0, RA0 – RA4, SRA0 – SRA4, Letter, Legal, Executive, Folio, Demy and Royal)
    • Table of Contents
    • Cover Page
    • Header and Footer
    • Theme or Custom CSS
    • Watermark
    • Protection
  • ePub (set in Read Offline->ePub)
    • Cover Page
    • Custom CSS
  • mobi (set in Read Offline->mobi)
    • Cover Page
  • Print features (set in Read Offline->print)
    • Add print header text
    • Custom print style
  • Permalink support (/read-offline/”postid”/”post-name”.”type”). I’ve written a “how-to add a permalink to your plugin” guide at
  • 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.


Please see the at GitHub


Latest version is at GitHub

  1. Download the plugin and extract the
  2. Upload the extracted read-online folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress


Add it to the top or bottom of each post and/or page (See Settings->Read Offline)

(shortcode and widget comming soon)


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


Arrays, Arrays, Arrays; aka Piklist for WordPress


Making cbnet Multi Author Comment Notification 1.1.2 WordPress multisite aware


  1. Richard Best

    Hi there

    Great plugin!

    I think it’d be awesome if you could add an option that would enable people to:

    (1) bookmark a collection of posts they’d like to read offline; and then
    (2) enable them to export all those posts in a single file, in the order they were bookmarked.

    Do you think that’d be possible?

    Kind regards

    • PerS

      Great idea Richard, hardest part is to create a user interface that’s easy to use/understand. Any suggestions?

      • You could just have a look at the Anthologize plugin for WordPress, because it does something very similar : create a “table of contents” of posts, and export them to a single PDF or ePub document (among other formats). See

        (actually, your plugin and the Anthologize plugin seem to go in the same direction; any chance of a merger ? ;-)

        • PerS

          The main difference between Anthologize and Read Offline, is that Read Offline is user/visitor centric. Anthologize is for the blog owner. Agree, we could merge but again that’s a large tast.

  2. Richard Best

    How about this:

    (1) the user can bookmark each post of interest via a link at the bottom of the post or in the post meta
    (2) bookmarked items are then all listed on a “my bookmarks” page or widget
    (3) on that page or widget, there’s an export option
    (4) the user can select a checkbox for each post the user wants to export
    (5) when the user clicks an “export” button (for the preferred file format), the export function then collects the checked posts and exports them all into a single file

    Would be awesome if the admin could select how much info is included in the export, e.g., title, body, meta, comments – all off or on

    Would also be awesome if the export feature could support a document format like Word or Google Docs.

    Thanks for considering this. Great plugin.


    • PerS

      Thank you Richard, I’ll look into it next week. Rest of this week will be spent at Gleneagles

  3. Αργύρης Καστανιώτης

    Hi PerS. Thanks for developing the plugin. There is a typo in download.php on line 24. “” is installed as “”.

  4. A few quick notes after testing version 0.1.1:

    1. In download.php, requiring ‘library/epub/’ (line 24) fails in case-sensitive hosts because the actual file is named

    2. The produced epub does not pass validation, basically due to the Body.html being raw html without proper wrapping with something like that:

    3. Tested with non-latin content, the produced epub is not readable (I guess it is related to 2 above but had not the time to test it)

    Keep up and regards,

  5. PerS

    Αργύρης and GPap, thank you for your feedback. I’ve fixed the problem with, please see the latest release.

    GPap, I will look into the other findings as soon as possible (early next week). Again, thank you.

  6. Ciccionissimo

    Hi! How can the plugin to do URL FRIENDLY?

  7. Hey there. Do you have any plans to add some customization features like the ability to add unique headers/footers?

    There’s a few particular things I’d like to do

    1. add custom header image to first page
    2. add article name and page number to following headers
    3. add website address to page footers

    Since my articles are all CC licensed, I’d also like add a footnote to end of each pdf to include the article source, publish date and author name.

    I’d also love to be able to style PDFs!

    I know this is all probably a lot of work, but I thought I’d mention it anyway.

    Great work on the plugin so far. It’s nice and clean!

    • PerS

      Added to the “Wish List”. Some should be easy, others a bit more complex.

      Thank you for your feedback.

    • PerS

      Styling PDF is in the latest version.

  8. Nice plugin, is there an example of it being used anywhere? I would like to check out a page using it without installing it if possible?

    • PerS

      Sure, added the plugin to this site :)

      Note, I haven’t styled the output (yet)

  9. Congratulations.
    If W3 Total Cache enabled this plugin gives problems. When updating any plugin always shows “Download failed.: Could not resolve host ‘'”. Thanks.

  10. PerS

    Hmm, strange. I’m also running W3 Total Cache, and I’m not having any problems. In W3 Total Cache I’ve enabled: Page Cache, Minyfy (except javascript), Database Cache, Object Cache and Browser Cache.

  11. My config: Page Cache on, Minify (JS minifier = JSMin), Database cache off, Object Cache off y Brower Cache on.

    If I disable read-offline, then there is no problem to update plugins.

    • PerS

      Please test this.



  12. I just made the change. When I need to update a plugin I confirm to you if it works.

  13. Your plugin does exactly what we’re currently looking for : a user-friendly editorial process to create documents online and export them in ePub and PDF format. So thanks a lot, and I hope your plugin comes out of beta soon ;-)
    I have a suggestion for ePub export : for a large post/page, a table of contents would be very useful. It could for instance be created from tags in the post (or some other tag specified by the user in the plugin settings). Would that be possible ?

  14. Bug : if the blog is not at the root of the web server, and doesn’t use permalinks, then the links to download posts are not correct, because they start at the root. Removing the leading slash before index.php in function ps_read_offline_url works on our installation, (I don’t know if that solution would work in all configurations).

  15. Me again : the fix above only works in function ps_read_offline_url from class ps_read_offline, but not in same function from class ps_read_offline_widget (different check for url rewriting).

    And a new bug in ePub export in version, also related to blog location : image wp-content/themes/twentyten/images/headers/path.jpg is not found if blog is not at root of web server.

  16. PerS

    Good morning Jacques. Thank you for your feedback. I’ll fix the url related bugs after work today.

    I like your idea on splitting large posts + toc (most likely splitting on h2-h5 (selectable in the settings page), I’ll add it to the “wish” list. At the moment I’m working on a new settings page for the plugin, need it for other features.

  17. In version 0.1.9 I still can not update plugins, W3 Total Cache gives problems with cache and dns to Akismet. If I disable read-offline, then there is no problem.
    Maybe the problem is in the htaccess rewrite rules?

  18. Hello Pers!
    Was looking for something like this. A feature request for Buddypress extension. I use an LMS plugin(Scholarpress Courseware). Wish there was a way to save lectures and export them into mobiles to read offline.

  19. I want different background of ech pdf .that is when pdf of a post is created then its background should be a thumbnail image of that post.
    How can i do this ????

  20. Paul

    Your site is down so I’m posting here. Your plugin causes rewrite rules flush every time you navigate through admin, I think that the problem is here:

  21. Strange problem. After upgrading to WordPress 3.5 and Theme Twenty Eleven 1.5. “Read Offline” doesn’t show anylonger on the default Hompage. Neither on the top, nor on the bottom of the post, nor as a widget.

    If I select a post or a page it works well.

  22. fabiano

    I have problems when generating mobi and epub files accent. How to fix this problem of language / language?

  23. Hugues

    Awesome plugin, thanks for this! It makes super clear PDF & ePub. I have a suggestion : can you make a PDF clickable table of content please ? (I don’t know if it’s even possible…)

    • PerS

      Tanks for reminding me, I’ll add it if the library I’m using supports it. I working on the next release, hopefully available next week.

  24. Hi, and thank you for the plugin.
    Next version I should like to see a custom formatted function for download link output. Also you may clean the library folder to unused fonts, scripts and so on.

    By the way, here is my job to you – a Russian i18n file to your plugin:

    In that URI I should update the translation for latest version of read-offline.

  25. erikvlie

    Hi Per,

    I tried entering this message on your website, but upon clicking the Add Comment button, there was a database connection error showing.

    I love your plug-in. I have one question though, and it might be my permission settings that aren’t right. The icons appear when they feel like it :-). Usually, I have to load a page a couple of times before they become visible.

    I first tried different browsers, but that doesn’t help, so it’s server-based. Then I tried changing permissions (777 on the plug-in dir, 777 on the dirs inside…) on the directories, but that doesn’t do much good either.

    It’s not a big deal of course, but it would be nice of they did appear. I’m running CentOS 6.3 x86_64, PHP 5.4.8, MySQL 5.1.66-cll and Apache 2.2.23. No caches on my Wp installation.

  26. Steff

    Hi Per, Great Plugin, works perfectly for me only one thing I cannot get right.
    I use a plugin called formidable to create list questionaires. In a custom display I can filter these questionaires in a certain way. On my site they appear right, The one I filtered. But when I try to make a offline PDF, read-offline picks the first questionaire not the filtered one. Any idea’s what the problem can be?
    Furthermore I am really pleased with it because it’s the first plugin that lets me create good looking pdf’s of tables etc.
    Kind regards Steff

  27. Per, this is a really terrific plugin for creating ePubs: they pass with flying colours in Sigil. But I do have two questions.

    1. Do you plan to add the facility to generate a Table of Contents in the ePubs and mobis? Otherwise I’ll have to use RO on my XAMPP site to generate the ePubs and then add the TOC manually in Sigil before uploading to the live website for downloading. Obviously, I’d much prefer to automate the process!

    2. I cannot generate valid mobi files at all. I keep getting an “end tag” error. This surprises me because the ePubs are flawless. As things stand, I will have to take the ePub from the above process and run it through Kindle Previewer to generate the mobi for uploading.

    Thanks very much!


    • Tim Kaye


      I have been delving a little deeper into this. I have now found that Read Offline does automatically generate a Table of Contents in ePubs, so long as I use an appropriate plug-in to put the ToC in the post. I have achieved excellent results using Table of Contents Plus. This allows me to put the ToC where I want it in the post, and then Read Offline reproduces it flawlessly in the ePub. Both ToCs even hyperlink to the appropriate points in the main body of text. Even better, I can style the ToC on both the web page and the ePub using CSS. It works perfectly, so there’s absolutely nothing to fix here — thanks!

      Unfortunately, PDFs produced by Read Offline don’t seem to respond to CSS styling. The result is that (a) although PDFs also reproduce the ToC from that inserted by Table of Contents Plus, they include text that I don’t want included here, and (b) as Hugues pointed out above, the ToC in the PDF is not hyperlinked to the text.

      Finally, none of this helps produce workable mobis. At present, I get the following error when I try to generate them:

      I don’t know what this means, but I am sure you do. If I take the ePub generated by Read Offline and convert it manually in Calibre (version 0.9.16), it works perfectly, so I’m sure this can be resolved.

      Many thanks and best wishes,


      • PerS

        Tim, thank you for your feedback. I really appreciate it.

        Here’s a teaser. I’m working with PDF at the moment, ePub and mobi next.

  28. Richard

    Hi there Per

    Thanks again for this great plugin.

    I was wondering whether you’re still planning on implementing an export to Word option please? If so, I’d be happy to pitch in with some support to speed up development.

    On a separate note, is it possible to add CSS for posts that will change the font and styles and add padding/spacing below paragraphs? I’ve not been able to get that to work but perhaps I’m doing something wrong.

    Thanks again

    • PerS

      Export to .docx is on my to-do list. You will also be able to add styles to control the look ‘n feel (not sure yet if you can modify the docx using styles).

      I’ve been rather busy lately, but plan to work on this plugin in the weeks to come.

      • hey there!!!

        for a while now we’ve been using this plugin, and boy is it great or what :) since our website is for travelers with limited internet access this plugin really helps us out.

        fiddling around with the settings we noticed you are planning on the docx option. and than we noticed you posted that about a year ago… Hoping you still are aiming at this, because this would help us even more.

        Cheers and keep up this good stuff!

        Peter for ACouplesOdyssey

  29. Richard

    That’s great news. Thanks Per. Do let me know if I can do anything to help, like beta test for you or contribute in some other way.


    • Richard

      P.S. Your Paypal donate link isn’t working? :)

  30. Richard

    Sorry for yet another comment. Last one for the night… . I’ve just noticed that, if you’re using a password-protected version of a WordPress install, the download links are still accessible to a person not logged in. Do you know whether it’s possible to prevent the download links from being publicly accessible to people who are not logged in and don’t have access to the relevant post?


    • PerS

      hmm .. noted, I’ll look into it.

      • Tim Kaye

        I use s2member to password-protect my WordPress installation. I have found that adding the following code to the end of my functions.php file deals perfectly with this issue:

        Best wishes,


  31. Elf Zig

    This plugin is worth its line in gold. Thank you so much for it!

    My feature request: let the featured image (formerly known as post thumbnail) of a post become the cover image of the export.

    Thank you so much again!

  32. Not sure if this has been added to the wish list. I would like the ability to turn it on and off for different pages/posts. I’ve had to turn it off because there are a few pages that I don’t want it on.

  33. Georg

    Hi there, your plugin is a wonderful idea, but the Pdf download produces a Internal Server Error. The other links work like a charme….
    Any thoughts on what the problem might be, or any ideas where to check?

    Cheers Georg

  34. Sue

    Congratulations on an excellent plugin!

    My only request/suggestion would be to either insert the name of the site as “author” or use the name of the poster.

    I’ll definitely be supporting this wonderful WP addition. Bravo!

  35. Hi Per,

    Nice plugin, thanks. Would it be possible to have it on forums also? When as widget in the sidebar, it only captures the last post, not the whole page.


  36. Vince

    Using Advance Custom Fields for a lot of information on my page, when I use this plugin it only pulls information from the Description field. How do I change it so is uses custom fields too?

  37. Vince

    it appears that there’s no support for page-break-inside as it seems to be ignoring the division and breaking.

  38. Richard

    Hi Per – Hope all is well. Just wondering whether you’re still planning on updating the plugin?

  39. Kim

    We have created a WordPress site that embeds interactive charts into the posts using the Visualizer plug ( The plugin uses Google Visualization API to render charts, however, when you save to PDF using your tool, these charts do not show up in the PDF. Is there any way to include these charts in the PDF? We publish research reports and we wanted to automate the PDF output function rather than having to create PDFs of the reports manually. Can you advise?

  40. Wrought

    Read Offline conflicts with AcademicPress plugin:

    Error: Unable to send file testing-this.epub.epub. Output buffer contains the following text (typically warnings or errors):
    Notice: Trying to get property of non-object in wp-content/plugins/academicpress/Acp/Bib/Shortcode.php on line 22 Notice: Trying to get property of non-object in /wp-content/plugins/academicpress/Acp/Bib/Shortcode.php on line 35

  41. 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

  42. 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

    • PerS

      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.

  43. Hi,

    Not working in long posts, for example, here:
    Only create a .pdf for the first 5 pages…

    Thanks for your help.

  44. 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…


  45. Hi,

    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,

    • Per Søderlind

      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.

  46. 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?

  47. I wish function to add own text at the start in output file (ex. “Downloaded from http://www…...”).

  48. julia

    hi there,

    how do I change the icons to my own ones? I’ve created new pngs and uploaded them to the same folder as the original pngs with a different name. Then changed the reference in the plugin edit, but my icons only appear as black squares now…

    • Per Søderlind

      Hi Julia,

      Please post the changes you’ve done and I’ll have a look at it.

  49. User

    Hey there,

    the potential of your “Read Offline” plugin is great. However, there are pages on which one might not want the download links to show up, so an exception list on which one can add the page IDs one doesn’t want them on would be great.

    And additionally, an option to change the font on the PDF would also be nice.

    Best regards

  50. Christian Poole

    I’ve only just downloaded the plugin and so far, it works pretty seamlessly.

    I would however like to see a few of features. If others have already suggested these, then I do apologize for repeating them, and would like to add my support to said suggestions.

    First: Title Page
    If you have an image you would like to use as the ‘cover’ and have it embedded in the post, I would like to see it as a separate title page in the ebook, meaning it would need to be a separate xml, xhtml, or html file within the ebook itself. The only way I can see this being at all feasible is if it used a picture that was entered at the very beginning of the post.
    I would also like to see a text-only dedicated title page, showing the title, author, a little ‘copyright’ blurb with the year the post was made, and a sort of ‘published by’ comment referencing the website/blog title/pre-defined ‘publisher’.

    Second: Chapter Breaks
    I would love the ability to take a post and break it up into chapters by detecting a tag in the HTML.

    There are other suggestions I have but they strike me as too complex and unwieldy to implement. I will go ahead and toss them out and you can make the judgement call to dismiss them.

    A way to assemble multiple posts/pages into a single anthology by creating a post/page that specifies which posts/pages to include.
    A table of contents page, which would be especially handy if the previous one ever gets implemented.
    A means of selecting a static page/post as an ‘acknowledgements’, ‘foreword’, or ‘afterword’ section.

    I suspect some of these are a touch too ambitious so I will let you chuckle good-naturally at my ridiculous nature as my grasp is never quite able to keep up with my reach.

    Thank you for taking the time to read.

  51. francesca

    Hi, just wondering why you don’t upgrade your Read Offline plugin since 2012… It is the only one that do what it does…

  52. Alvaro

    Hi. Does the plugin work on mobile devices? Thanks.

  53. Michael

    I use the plugin for PDF creation. This is generally working fine, but I have noticed that remote images sometimes do not appear in the PDF. It turned out that URLs containing & cause the problem. They are urlencoded, while they should not be. In the _getImage function in, I added a

    $file = str_replace(‘&’,’&’, $file);

    and it works. I’m sure this can be fixed in a more appropriate way. Thanks

  54. Alexandre

    I’m using the plugin to create pdfs and epubs from custom post types. As I use post_content to store the content, the content shows, but the rest of the meta data does not, as it is stored in post meta.

    It would be really helpful to be able to set meta data for the epubs and pdfs from meta data.

    Also, an option to create a custom cover page, with the site title, url, images maybe would be useful.

    Do you accept pull requests?

    Thanks for your great work!

    • Per Søderlind

      I’m working on a new version which will add support for custom post types, custom cover page etc.

      I will accept pull requests after I’ve released it


  55. Arnold Marunda

    We are using Read Offline to enable students to take topics offline from a wordpress-based elearning platform behind a firewall at school. So that they can read at home as a “flipped classroom” feature. So far it is working great.

    Are you able to make it possible to use the posts featured image as the background image for the cover when creating the pub file.

    Your work in developing this plugin is greatly appreciated.

    Many thanks,


  56. Hi, thanks for this plugin.

    I’m having issues with ePubs when Jetpack is installed.

    Error example: “This page contains the following errors:
    error on line 48 at column 127: AttValue: ” or ‘ expected “

  57. Really liking this plugin, and had a few questions.

    1. MOBIs aren’t working at all (Norwegian magazine, so ÆØÅ fucks up everything), but it seems that if you run the EPUBs through Calibre it works without problems. Is there a possibility to fix this up? It shouldn’t have to be that hard for MOBI to read/write accented characters.

    2. Your plugin does this nearly magic thing where it gets the post data right from the database, rather than printing from the theme, and thereby bypasses design flaws which would normally fuck up EPUBs (in our case, mostly Bigfoot.JS). Do you think you could add a “Print”-version in addition to PDF, EPUB, and MOBI? This would output great, clean, HTML-files, which one could easily print without having to go through the PDF (or, in our case, having the Send To Kindle-function working flawlessly).

    3. I would love the option to add some content at the end/start of the output (e.g. copyright, site disclaimer, URL and such), and if one could have the option to include the author bio, this plugin would be perfect.

    Generally, thanks a lot for the plugin!

    • Per Søderlind

      I’m working on (been for a while) the next version. It will have better pdf, epub and mobi support (and being a Norwegian, ÆØÅ is important for me too). The idea, supporting Print, is great. I’m adding it.

      Edit: Added in the lastest version

      • Lovely!
        Looking forward to it (and, if you need testers, I would be happy to assist).

        Again, thanks for a fantastic plugin!

  58. Hi again, and thanks for the update!

    A few quick thoughts after having just installed it:

    It seems like internal linking (for footnotes) doesn’t work (and didn’t work before either) in PDF. Is there a way to migrate to PDF’s bookmark function?

    It also seems like it doesn’t respeck header/footer content (so no author, site title, URL or anything) that’s specified in the settings (this _might_ be a problem with Varnish, altough I don’t see why or how. Will get back to you if it was). It also be lovely if it filled out Author, Subject (maybe categories) and Keywords (tags) automagically. I thought it would that already, but it doesn’t seem to do that.

    Otherwise, Print doesn’t seem to work at all thus far (but again, this might be a Varnish-issue), and is just serving me a 404…

  59. Mark

    I’ve just tried to update the plugin and it thows this error:
    Warning: include_once(/httpdocs/wp-content/plugins/read-offline/library/admin/admin-page-framework.min.php): failed to open stream: No such file or directory in /httpdocs/wp-content/plugins/read-offline/class-read-offline-admin-settings.php on line 7
    Warning: include_once(): Failed opening ‘/httpdocs/wp-content/plugins/read-offline/library/admin/admin-page-framework.min.php’ for inclusion (include_path=’.:’) in /httpdocs/wp-content/plugins/read-offline/class-read-offline-admin-settings.php on line 7
    Fatal error: Class ‘AdminPageFramework’ not found in /httpdocs/wp-content/plugins/read-offline/class-read-offline-admin-settings.php on line 11

Comments are closed.

Powered by WordPress & Theme by Anders Norén