Make PDF Newspaper

Overview

‘Make PDF Newspaper’ replaces the Make Tabbloid Plugin to automatically create printer friendly ‘tabloid’ editions of your WordPress blog in an attractive 2 column magazine/newspaper format.

Development of the original plugin has stopped after HP removed API access to their service Tabbloid. The new plugin uses code developed for the Five Filters PDF Newspaper project, which in itself pulls together code from a number of other open source projects including TCPDF,HTML Purifier, SimplePie and SmartyPants

The plugin includes a widget to let you control how you advertise your ‘tabloid edition’. You can also choose to display a thumbnail of your custom newsletter (powered by Bluga.net Webthumb) to let your readers see what they are missing.

Key features

  • NEW Option to generate PDF from externally hosted versions of the Five Filters code (if you are hosting a version of the Five Filters code and would be happy for other people to generate PDFs using it please leave its url in the comments ;-)
  • NEW Option to generate PDF editions of selected categories or archives
  • PDF generation entirely self-hosted removing reliance on 3rd party services and making it suitable for Intranet installations of WordPress
  • Option to include QR codes for each post
  • Customisable banner text and logo
  • Option to automatically footnote all the links which appear in a post (using tinyurl or bitly to shorten long links)
  • Integrated widget to display thumbnail of your publication
  • User controlled production of PDF

Click here to download

Thanks to

This plugin is made possible by the hard work of Keyvan Minoukadeh creator of Five Filters PDF Newspaper and Jonathan Lyon who nudged me on.

Useful links

Screenshot

Any comments or suggestions very welcome.

133 Responses to “Make PDF Newspaper”


  • OK, issue solved:

    my etc/hosts file had my domain listed as a loopback.

    I had this line in hosts in order to get mail generated locally for another application:

    127.0.0.1 localhost mydomain.com

    This resulted in WP trying to use loopback instead of the real IP to acquire the RSS content for the pdf. That’s why the pdf ended up blank.

    All sorted now; thanks to Mike for pointing the way.

    Paul

  • OK, my final comment on this for a while, but hopefully one that will help generally.

    Paul’s problem arose because the Server is making HTTP requests of itself in order to create the PDF.

    So, if you have a blank newsletter (main one, not category one) you should issue the following http requests in your browser
    http:///?feed=make-pdf-newspaper
    This will return the RSS feed. If it’s blank it’s a problem with your RSS feed, play with the settings inside wordpress.

    If, however, there is content in this feed but not in your newsletter then the problem is probably that when the server makes the request it is not getting back the same as you are getting in the browser. There are any number of reasons this could happen. Paul’s problem was that his http request was being redirected to a different virtual server because it was coming in via the wrong IP address.

    The way to check this is to log onto the server and issue the commandline `wget http:///?feed=make-pdf-newspaper`
    This will return a file, I think it is called index.html?feed=make-pdf-newspaper

    It contains the feed that the server is retrieving. Open this file in an editor and you should see some clues as to what the problem is. Also look at the web server log file and see how the request is being logged. If it is going to the wrong virtual server, you need to change your server config to fix this.

    In principle the plugin could be made more robust by having the browser retrieve and then re-post the feed via javascript/ajax, rather than making the http request from the server. However I’m not volunteering to write that.

  • Thanks again Mike for you input. I’ll see if I can incorporate an improved feed recovery in the next version
    Martin

  • @ Paul:

    What does your your PHP error log report when calling http:///?feed=make-pdf-newspaper
    Are there any errors?

  • @Eric

    Just to clarify Martin means:

    http://yourdomain.com?feed=make-pdf-newspaper

    When I did a wget for this url, the resulting file contained the folowing:

    Warning: require(./wp-blog-header.php) [function.require]: failed to open stream:
    No such file or directory in /var/www/index.php on line
    17

    Fatal error: require() [function.require]: Failed opening required
    ‘./wp-blog-header.php’
    (include_path=’.:/usr/share/php:/usr/share/pear’) in
    /var/www/index.php on line 17

    … and the line 17 it refers to was:

    require(‘./wp-blog-header.php’);

    Paul

  • I’ve picked up a small bug in image generation.

    When an image name contains a + in it (eg image+.jpg), the image is not shown in the pdf (but a valid link will appear if you have these switched on). If you remove or replace the plus sign, the image will appear.

    Paul

  • Just found this plugin and I think it will be just what I need for a project. I’ve been testing it out and I can get it to generate correct pdf files for categories and archives, so that’s great.
    The problem though is the ‘normal’ pdf based on the custom feed. When I check the feed, only a limited selection of articles appear (and the plugin is correctly generating a pdf of what it finds). When I check the proper site feed, I see all the posts I expect to see, so there is nothing inherently wrong with the site feed - just the custom version.
    The archive version is really the one I need and that works, so all is good. But it would be nice to figure out the other problem.
    Thanks,
    John

  • Sorry - some other questions that popped into mind after I’d posted.
    Is there a way of automatically generating a monthly archive of posts?
    Setting up a cron job to run, say, on the first of each month, isn’t a problem. But how would I tell it to create a pdf containing the posts from the previous month?
    And is there a way of combining archives and categories? If I wanted, say, the last month’s post in category A in one pdf and last month’s post of category B in another.
    And then there is the next obvious question - multiple categories? Is it possible to create a pdf drawing from combinations of categories? Even if it was do-able from a customised url that would be a start.
    Thanks again,
    John

  • Hi JohnO,
    Quite a bit here that I’ve never even thought of. I’m wondering if a better route for you would be to self-host your own version of the full FiveFilters code then cron the various versions you need. This would give you more flexibility in the rss feeds you can pdf (wordpress lets you pull rss from all post,categories, tags, archives by adding ?feed=rss to the url. You could also merge feeds using Yahoo Pipes)

    Some problems you might encounter for what you’re wanting to do are: rss feed limits and server memory to compile the pdf.

    Sorry I can’t be of more help,
    Martin

  • Thanks for the prompt reply Martin.
    I’ll have a look at the full FiveFilters code and see what’s involved with that.
    It’s a long time since I’ve done any serious coding but, since you know your own code, I wonder what you think would be involved in getting the multiple choices of category and archive going?
    John

  • Hi JohnO,

    Don’t think multiple categories are possible but archives might. The very last option in Make PDF Newspaper settings lets you specify a custom url from your blog, which could be an archive address. All you’ve got to do (and I don’t know if it is possible) is write a cron which can include last month number and year number.

    Martin

  • Thanks for the pointers. I shall go play when I get a chance.

  • Hi Martin,

    cronjobs are not working with this url. They need a file, not a command.

    Any ideas?

    greetz
    Frank

  • Hello !
    I am trying to make it work.
    - I installed Version 2.2.4 on WordPress Version 3.0.2.
    - I created a “pdf” folder in “wp-content”. Its rights are 707. I cannot change it to 777 (my provider is OVH).
    - I activated the plugin
    - I saved the settings
    “Test PDF” gives me this error :
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homez.157/XXXX/www/wp-content/plugins/make-pdf-newspaper/makepdf.php on line 156
    I cannot figure out why…
    I’d be happy to know :)
    Thanks very much !

  • @Franky Hi Franky - I’m not a cron expert but a file with a query string should work. I wonder if it is timing out before completing

    @Bill Hi Bill - I’ve never seen this one before. The only thing I can think of is that all the libraries with the plugin haven’t been uploaded (but that’s a very long shot)

    Martin

  • “User controlled production of PDF”

    is there more info on how this part works?

    thanks

  • Hi Jon - it just means the user controls when a pdf is remade.

  • hi martin
    i don’t undestand what i must write with external service

    Engine URL :

    Optional parameters :

    i try to put this link http://fivefilters.org/pdf-newspaper/makepdf.php?feed=ripartiamodanoi.it/rss

    but I have this ERROR 404 on my site

    Nico

  • Hi Nico - the Engine URL is an optional entry if the plugin is unable to make a pdf itself because of your server configuration. If you do need to use it the url will be something like http://fivefilters.org/pdf-newspaper/makepdf.php
    Martin

  • i need for external configuration but if i put your suggestion in engine url is error 404
    sorry. i don’t undestand something ?

  • Hi Martin

    Thanks for the brilliant application. It really does wonderful thing.

    I was having a only a mistake when i make a pdf, somme letter with accent dont appears

    Thanks ind advance

    example:
    http://energuia.com/wp-content/pdf/energuia-2010-12.pdf

    í appears ´

    Ex: “Pero al igual que los autos los primeros intentos eran simples adaptaciones de bater´as a un modelo ya existente,”

  • Hi Rafael - Think I’ll have to check this one with the developer of the PDF engine (FiveFilters) to see if it is a known problem.

    Thanks,
    Martin

  • Hi Rafael, Appears to be fine with my PDF reader (Adobe). Which one are you using?

  • Well after a lot of time triying to solve a lot of errors,
    this is my last problem.

    Any Idea?
    regards
    MAx

    Warning: trim() expects parameter 1 to be string, array given in /var/www/blog/wp-content/plugins/make-pdf-newspaper/libraries/phphooks/phphooks.class.php on line 185

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/blog/wp-content/plugins/make-pdf-newspaper/libraries/phphooks/phphooks.class.php:185) in /var/www/blog/wp-content/plugins/make-pdf-newspaper/makepdf.php on line 385

  • Hi Max - in chasing errors have you had to add much code? Line 385 of makepdf.php is just a header redirect and doesn’t call anything in phphooks.
    Martin

  • Hi Martin,

    are you still working on this plugin?

    In forum are posts with no answers, since months.

    Also i need to know, how i can include more or all posts in the PDF. Urgent!

    Thx, Frank

  • Hi Frank - afraid all of my wordpress plugin development is on ice. You should be able to add more posts to the pdf by upping the general WordPress Reading Setting and increasing the number of Syndication feeds show the most recent. The problem you might get is the plugin running out of memory when writting a big pdf
    Martin

  • Well, it’s incredible but don’t work!!!! One week trying but zero results!!
    My last error
    Fatal error: Allowed memory size of 62914560 bytes exhausted (tried to allocate 7864320 bytes) in /home/autismod/public_html/wp-content/plugins/make-pdf-newspaper/libraries/tcpdf/unicode_data.php on line 16479

    Only with one new, not a lot of news obiously. Only One register

    And if I use the web service, mmmm, not nice! Only two pages.
    I use the last version of wordpress
    Any Idea?

  • All the problems soved!!!! Finally works!!!
    Thnks a lot
    Max

  • Hi,

    Thanks for the great work !

    Was looking to get a forum to ask my question because of too many comment to read 130 so far :)

    Bug issue:

    Cannot change the phrases in options page in english and that I needto put in french :

    I try on the option page, no change saved, and try by phpMyadmin and changing this phrase in mysql have cause erase of newspaper data.

    Alos I wanted to know how to change the number of article in PDF, and how to choose or define a starting & ending date of a article selection ?

    Thanks for your time reading.
    David

  • The top of my banner and the page numbers get clipped when I print. In the print dialog box it indicates a document size of 8.3 by 11.7 inches.

    Is there any fix for this?

Leave a Reply

About

This blog is authored by Martin Hawksey e-Learning Advisor (Higher Education) at the JISC RSC Scotland N&E.

mhawksey [at] rsc-ne-scotland.ac.uk | 0131 559 4112 | @mhawksey

JISC RSC Scotland North & East logo

If you would like to subscribe to my monthly digest please enter your email address in the box below (other ways are available to subscribe from the button below):

Subscribe to MASHe to monthly email updates

Loading...Loading...


The MASHezine (tabloid)

It's back! A tabloid edition of the latest posts in PDF format (complete with QR Codes). Click here to view the MASHezine

Preview powered by:
Bluga.net Webthumb

The MASHezine (eBook)

MASHe is also available in ebook and can be downloaded in the following formats:

Powered by NEWSTOEBOOK.COM

Archives

Opinions expressed in this blog are not necessarily those of the JISC RSC Scotland North & East.

JISC Advance Logo

JISC Advance is a new organisation that brings together the collective expertise of established JISC services:

For further information visit www.jiscadvance.ac.uk

Creative Commons Licence
Unless otherwise stated this work is licensed under a Creative Commons Attribution-ShareAlike 2.5 UK: Scotland License