StoryHack.com

post2ebook WordPress Plugin

Plugin Description

This plugin generates ebook versions of any post you want and automatically inserts links to generated ebooks. Currently you can have it generate ebooks in pdf and epub formats.

I initially was just going to do a custom print.css for my site, but things still would not print right (lines get cut in half vertically at end of page, etc.) I figured this would guarantee a good print everytime, no matter the browser.

This is my first wordpress plugin, so please be gentle when you comment about how bad it sucks.

Requirements

WordPress 3.0.0 or later. It probably works on some older versions of wordpress, too. I just don’t have any older installations kicking around to test it on.

Warning

This plugin is very likely to contain bugs. I don’t think it will ruin your wordpress installation, but you install it at your own risk anyway.

Download

You’ll only read the rest of this if you can’t figure it out anyway, so here’s the download.

post2ebook v 0.2

Donate

If you want to show me some gratitude in monetary form, you can send me a buck or two via paypal.


Installation

  1. Unzip post2ebook.zip
  2. Upload `post2ebook` directory to the `/wp-content/plugins/` directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. While you are on the “Edit Post” page, click the HTML editing tab (rather than “visual”) and put in one of the following tags whereever you want the links to appear. <!--post2ebook_pdf-->,<!--post2ebook_pdf_image-->,<!--post2ebook_epub-->, or <!--post2ebook_epub_image-->

Demo

See the plugin in action on this post.

Bug Reports

For now, just use my contact me page with a healthy description of the problem.

Frequently Asked Questions

So nobody has actually answered any questions yet, so I’m going to make some up.

Q. Does this make an ebook out of every post?

No, when you save or create a post that contains the right html comments, then the appropriate ebook(s) are built.

Q. What types of ebook can be generated?

Currently the plugin generates two types of ebooks (and two types of links):

pdf

<!–post2ebook_pdf–> Displays a link to the generated pdf that says “Download a PDF of this post”

<!–post2ebook_pdf_image–> Displays a pdf logo image link to the generated pdf

epub

<!–post2ebook_epub–> Displays a link to the generated epub that says “Download a ePub of this post”

<!–post2ebook_epub_image–> Displays a epub logo image link to the generated epub

Q. Why doesn’t it include user comments in the ebooks?

I didn’t want it to. Maybe I’ll add that as an option for a later version.

Changelog

= 0.2 =
* pdf generation fixed
= 0.1 =
* Initial Release

Comments (8 Responses)

September 17th, 2010 Clive

MMmmm the epub link works well BUT the .pdf version just has a couple of lines in it – nothing of the post.

September 17th, 2010 Bryce Beattie

Hmm. I wonder what’s up. I could have sworn it worked a minute ago.

September 17th, 2010 Richard

This looks like a great plugin. Thank very much for building it. I’ll download and test shortly.

I’ve one question please. It is possible to add a template tag for the PDF output into a theme template file?

Many thanks
Richard

September 18th, 2010 Shanker Bakshi

A Good Idea, hope soon it will be FREE from all possible bugs.

September 18th, 2010 Bryce Beattie

Richard – no theme tag yet. I’ll think on a good way to integrate it.

September 19th, 2010 Buikspier Inge

Does the PDF version of a post also show the images that are used in the original post?

September 20th, 2010 Bryce Beattie

Nope, I’m afraid not. I haven’t quite figured out how to make it work yet.

September 20th, 2010 Buikspier Inge

Would be great if it did show post images in the PDF export. I did try some other WP post 2 PDF plugins but none of them show post images.

Leave a Reply

Font Size