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.
To create a PDF or printable version of a web page or feed, pass the URL (encoded) in the querystring to the following 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).
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 |
|
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 |
|
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. |
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_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. |
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.) |
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.
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:
To change the configuration, edit custom_config.php and make any changes you like.
If everything works fine, feel free to modify this page by following the steps below:
Next time you load this page, it will automatically load custom_index.php instead.
If you'd like to modify the HTML template (only affects HTML output, not PDF):
Check our help centre if you need help. You can also email us at help@fivefilters.org.
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.
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.
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.
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:
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 from fivefilters.org.
Your version of PDF Newspaper: 2.6 — check for updates
Your version of Full-Text RSS*: 3.9.5 — check 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.
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...