PDF Newspaper 2.6 — from FiveFilters.org

Create newspaper from feed or webpage URL
Options
Multi-story options

Thank you!

Thanks for downloading and setting up PDF Newspaper from FiveFilters.org. The software runs on most web hosting environments, but to make sure everything works as it should, please follow the steps below.

Quick Start

  1. Check server compatibility to make sure this server meets the requirements
  2. Make sure the cache folder and its two sub-folders are writable (you might need to change permissions to 777)
  3. Enter a feed or article URL in the form above and click 'Create' ?
  4. Wait for the PDF to load.
  5. That's it! (Although see below if you'd like to customise further.)

URL Construction

To create a PDF or printable version of a web page or feed, pass the URL (encoded) in the querystring to the following URL:

  • /makepdf.php?v=2.6&url=[url]

All the parameters in the form above can be passed in this way (examine the URL in your address bar after you click the 'Create' button above).

Request Parameters

Using the form above is the easiest way to get started. But if you want to call PDF Newspaper programmatically, the following request parameters can be used in a HTTP GET request to makepdf.php:

Parameter Value Description
url string URL of a feed or a single web article.
mode multi-story (default), single-story
multi-story
Use for feeds. You can customise the newspaper title.
single-story
Use to process a single article (even with feeds). Produces a more compact layout, omitting newspaper title.
template A4 (default), Letter, A5 Sets PDF paper size. The A4 and Letter templates produce a larger, two-column PDF. The A5 template produces a smaller, single-column PDF.
output pdf (default), pdf-download, html
pdf
Your browser decides what to do with the generated PDF - either it will load the PDF within the browser, download it, or prompt you to choose an action.
pdf-download
Tells the browser that you want to download the PDF rather than view it inside the browser. It will either download automatically or prompt you to choose an action.
html
Outputs the generated HTML without producing a PDF. Produces a result faster than the pdf options, but uses a print stylesheet to achieve a somewhat similar result when you print. Note: the template parameter currently has no effect with HTML output - if printing, you will set the paper size in the print dialog that appears. For best results printing or creating a PDF from this view, please use Firefox.
dir auto (default), ltr, rtl Sets text direction: auto = browser decides, ltr = left-to-right, rtl = right-to-left. This parameter currently only works for HTML output.
images 1 or 0 (default) Include images. Pass 1 to enable.
date 1 or 0 (default) Include date and time for each article (if available). Pass to 1 to enable.
sub string This can be a tagline, slogan, or the main title if using single story mode. If omitted, the default one set in the config file will be used.

Multi-story parameters

These parameters only apply when multi-story mode is enabled (see mode parameter above).

Parameter Value Description
title string Newspaper title. If you'd like to use the default title image instead, delete the title.
order desc (default) or asc Determines how stories will be ordered by date. Pass asc for chronological ordering (oldest story in the feed appears first). Pass desc to have the latest stories shown first.
date_start string If the feed contains dates for feed items, you can restrict items returned by specifying a start date. Any items with a publish date earlier than date_start will be omitted from the output.
date formats
You can pass an absolute date using the YYYY-MM-DD format, e.g. 2014-01-24 or a relative one, e.g. last week or yesterday.
date_end string If the feed contains dates for feed items, you can restrict items returned by specifying an end date. Any items with a publish date later than date_end will be omitted from the output. See note above about using relative and absolute dates.

Full-Text RSS integration

When you give PDF Newspaper a URL to a web article, Full-Text RSS is automatically used to extract its content. For a partial feed, you will have to tell PDF Newspaper if you'd like it passed to Full-Text RSS for full content. (Full-Text RSS integration can be configured or disabled within the config file.)

Parameter Value Description
fulltext 1 or 0 (default) Use for partial feeds. Runs feed through Full-Text RSS before processing result. Pass 1 to enable.
use_extracted_title 1 or 0 (default) Normally feed titles take precedance over extracted titles. Pass 1 to tell Full-Text RSS to replace feed titles with those it extracts. (Requires Full-Text RSS version 3.2 or greater. Has no effect without fulltext parameter.)

API keys

If you want to restrict access to PDF Newspaper you can specify API keys in the config file. URLs produced by PDF Newspaper can be used publically, e.g. linked from a website, so the API key should not appear in the final URL.

Parameter Value Description
api_key string A key that you've entered in the config. If you're calling PDF Newspaper programattically, it's better to use the key and hash parameters (see below) to hide the actual key in the HTTP request. If this parameter is used, PDF Newspaper will produce the key and hash values automatically and redirect to a new URL to hide the API key. If you've configured PDF Newspaper to require a key, an invalid key will result in an error message.
key integer This should be the index number which identifies an API key without revealing it. It must be passed along with the hash parameters. See the config file.
hash string A SHA-1 hash value of the API key (actual key, not index number) and requested URL, concatenated. It must be passed along with the key parameter. In PHP, for exmaple: $hash = sha1($api_key.$url);

Required parameters: url must be supplied.

Configure

In addition to the options above, PDF Newspaper comes with a configuration file which allows you to control how the application works. Find out more.

Features include:

  • Restrict access by setting up an access key
  • Restrict access based on input URL
  • Set default subheading
  • Set title image
  • Set PDF metadata

To change the configuration, edit custom_config.php and make any changes you like.

Customise this page

If everything works fine, feel free to modify this page by following the steps below:

  1. Save a copy of index.php as custom_index.php
  2. Edit custom_index.php

Next time you load this page, it will automatically load custom_index.php instead.

Customise HTML template

If you'd like to modify the HTML template (only affects HTML output, not PDF):

  1. Save a copy of html_template.html as custom_html_template.html
  2. Edit custom_html_template.html

Support

Check our help centre if you need help. You can also email us at help@fivefilters.org.

About

This is a free software project to help people create printable PDFs from content found on the web. It is being developed as part of the Five Filters project to promote independent, non-corporate media.

Bookmarklet

Rather than copying and pasting URLs into this form, you can add the bookmarklets on this page to your browser. You can drag the buttons below to your browser's bookmarks toolbar. Then whenever you'd like a printable version of an article, click the bookmarklet.

Drag:

Note: These bookmarklets use single story mode, with images enabled. They do not include any access keys you may have configured.

Free Software

Note: 'Free' as in 'free speech' (see the free software definition)

If you're the owner of this site and you plan to offer this service to others through your hosted copy, please keep a download link so users can grab a copy of the code if they want it (you can either offer a free download yourself, or link to the purchase option on fivefilters.org to support us).

For full details, please refer to the license.

If you're not the owner of this site (ie. you're not hosting this yourself), you do not have to rely on an external service if you don't want to. You can download your own copy of PDF Newspaper under the AGPL license.

Software Components

PDF Newspaper is written in PHP and relies on the following primary components:

Depending on your configuration and desired input/output, these secondary components may also be used:

System Requirements

PHP 5.4 or above is required. A simple shared web hosting account will work fine. The code has been tested on Windows and Linux using the Apache web server.

Download

Download from fivefilters.org.

Your version of PDF Newspaper: 2.6check for updates
Your version of Full-Text RSS*: 3.9.5check for updates

If you've purchased this from FiveFilters.org, we'll email you when we release a new version. Full-Text RSS is not an essential part of PDF Newspaper, but it plays a big role when you're processing partial RSS feeds or turning standard web articles into PDF.

* This refers to the bundled version of Full-Text RSS.

AGPL logo

PDF Newspaper is licensed under the AGPL version 3 — which basically means if you use the code to offer the same or similar service for your users, you are also required to share the code with your users so they can examine the code and run it for themselves. (More on why this is important.)

The software components used by the application are licensed as follows...