URL Variable |
Twiki Preference Variable |
Default Value |
Example |
Explanation |
pdfbanner |
GENPDFADDON_BANNER |
|
Foobar Documentation System |
Used to override the banner of a title page. |
pdftitle |
GENPDFADDON_TITLE |
|
Writing Foobars |
|
pdfsubtitle |
GENPDFADDON_SUBTITLE |
|
A short guide to creating foobar documents |
|
pdfheadertopic |
GENPDFADDON_HEADERTOPIC |
|
GenPDFHeaderFooterTopic |
The name of a topic that defines headers and footers using <-- HEADER LEFT "foobar" --> syntax |
pdftitletopic |
GENPDFADDON_TITLETOPIC |
|
GenPDFTitleTopic |
The name of a topic that defines the layout of the title page |
skin |
GENPDFADDON_SKIN |
pattern |
nat |
Default skin to use for PDF generation |
cover |
GENPDFADDON_COVER |
print |
print.nat |
Default cover to use for PDF generation |
pdfrecursive |
GENPDFADDON_RECURSIVE |
undef |
on |
Include children of the base topic in the PDF |
pdfformat |
GENPDFADDON_FORMAT |
pdf14 |
pdf12 |
HTMLDOC output format |
pdftoclevels |
GENPDFADDON_TOCLEVELS |
5 |
3 |
Number of levels to include in the PDF table of contents (use 0 to disable the generation of a table of contents). Note that HTMLDOC generates a table of contents based on HTML headers in the page. |
pdfpagesize |
GENPDFADDON_PAGESIZE |
a4 |
letter |
The page size for PDF output |
pdforientation |
GENPDFADDON_ORIENTATION |
portrait |
landscape |
The page orientation (e.g. landscape or portrait) |
pdfwidth |
GENPDFADDON_WIDTH |
860 |
1060 |
The pixel width of the browser (used to scale images--images wider than this will be truncated) |
pdfheadershift |
GENPDFADDON_HEADERSHIFT |
0 |
+3 |
Shift all headers up or down (for negative values) by this amount (e.g. H1 would become H3 for a value of 2). |
pdfkeywords |
GENPDFADDON_KEYWORDS |
%FORMFIELD{"KeyWords"}% |
'foo, bar, baz, zip' |
Used for PDF Keywords META info to help search engines |
pdfsubject |
GENPDFADDON_SUBJECT |
%FORMFIELD{"TopicHeadline"}% |
'Foobar document creation' |
Used for PDF Subject META info to help search engines |
pdftocheader |
GENPDFADDON_TOCHEADER |
... |
l.. |
See http://www.htmldoc.org/ |
pdftocfooter |
GENPDFADDON_TOCFOOTER |
..i |
.i. |
See http://www.htmldoc.org/ |
pdfheader |
GENPDFADDON_HEADER |
|
.1. |
Specify content of header, see http://www.htmldoc.org |
pdffooter |
GENPDFADDON_FOOTER |
|
.1. |
Specify content of footer, see http://www.htmldoc.org |
pdfheadfootfont |
GENPDFADDON_HEADFOOTFONT |
|
Helvetica-Bold |
Font specification for headers and footers. |
pdfheadfootsize |
GENPDFADDON_HEADFOOTSIZE |
|
12 |
Sets the size of the header and footer text in points (1 point = 1/72nd inch) |
pdfbodyimage |
GENPDFADDON_BODYIMAGE |
|
http://my.server.com/path/to/background.jpeg |
The image that will appear tiled in the background of every page |
pdflogoimage |
GENPDFADDON_LOGOIMAGE |
|
http://my.server.com/path/to/logo.jpeg |
The logo that will appear in a header or footer if you specify 'l' in the string (see http://www.htmldoc.org) |
pdfnumberedtoc |
GENPDFADDON_NUMBEREDTOC |
undef |
True |
Option flag for getting numbered headings and Table of Contents. Set it to anything for true. |
pdfduplex |
GENPDFADDON_DUPLEX |
undef |
True |
Option flag to set up the document for duplex printing. Headers and footers will swap position on alternating pages. Set it to anything for true. |
pdfpermissions |
GENPDFADDON_PERMISSIONS |
undef |
print,no-copy |
PDF Security permissions to disable print/copy etc. By default the PDF is not protected. |
pdfmargins |
GENPDFADDON_MARGINS |
undef |
top:0.5in,bottom:2.5cm,left:12pt,right:15mm |
Specify the page margins (white space to edge of page) |
pdfbodycolor |
GENPDFADDON_BODYCOLOR |
undef |
#CCff99 |
Specify the background colour of all pages |
pdfstruct |
GENPDFADDON_STRUCT |
book |
webpage |
use book for structured topics, i.e. when rendering a bunch of topics recursively; use webpage when printing a topic without a specific heading structure, i.e. if it is just a normal webpage or if it has got a special VIEW_TEMPLATE |
Add-on Author: |
TWiki:Main/BrianSpinar, TWiki:Main/WadeTurland |
Add-on Version: |
02 Jul 2008 |
Change History: |
|
02 Jul 2008 |
added support for VIEW_TEMPLATE and COVER ; fixed rendering of anchor and img tags; added pdfstruct parameter to print unstructured webpages as well; TWiki:Main.MichaelDaum |
25 Jun 2008 |
added template activation and Configure script spec file TWiki:Main.SvenDowideit |
25 Jun 2008 |
security and TWiki 4.2 fixes TWiki:Main.SvenDowideit |
2 Nov 2007 |
Added new header and footer control (Bugs:Item4916) and fixed generation of wrong TWiki page (Bugs:Item4915) |
23 Oct 2007 |
Fixed Bugs:Item4452 & Bugs:Item4885, compatibility with Perl 5.6 and missing images with SSL certificates |
31 Aug 2007 |
Fixed Bugs:Item4530, improper rendering of lists |
13196 |
Removed nop tags before sending to htmldoc, fixed Bugs:Item3549 |
11673 |
TWiki:Main/RickMach updated MIME type to pdf from x-pdf, fixed bug preventing disabling the TOC |
9716 |
TWiki:Main/CrawfordCurrie added content-disposition header to files, so they download using a sensible file name |
9683 |
TWiki:Main/CrawfordCurrie updated for TWiki-4 |
Version 0.6 (28 Jun 2005) |
- Less aggressive regex for removing twikiNewLink spans so it doesn't break when using the TWiki:Plugins.SpacedWikiWordPlugin
- Added 'recursive' preference to include chapters for all descendents of the base topic
- Use File::Spec->tmpdir to specify the default directory for temporary files
|
Version 0.5 (16 Jun 2005) |
- Redirect to 'oops' URLs if permission denied or topic does not exist.
- Removed twikiNewLink spans from title page so they render as normal text (without the blue ? mark).
- Fully qualify image/href URLs on the title page.
- Changed temp files to use OO style 'new File::Temp;' for better code portability.
|
Version 0.4 (13 Jun 2005) |
- Better security (now calls
system($TWiki::htmldocCmd, @htmldocArgs) ) - Checks return code of htmldoc and returns an error on failure
- Validation of preferences
- Preferences changed to comply with TWikiPlugins standard
- Better HTML3.2 compatibility for htmldoc 1.8.24 (downgrades a few elements)
- Full integration of PDF META tags (optionally using 2 FORMFIELDs):
- ==%FORMFIELD{"TopicHeadine"}%== for PDF Subject field
- ==%FORMFIELD{"KeyWords"}%== for PDF Keywords field
- all other PDF fields use topic info
- More htmldoc options (margins, permissions, numbered TOC, logoimage, headfootfont) using preferences
- Removed
%TOC% fields so it only uses HTMLDOC's TOC - Title topic and header/footer topics are now fully rendered
- Fixed the heading shifting function
- Fully qualify links, making the document portable
- HTMLDOC output goes to a temp file instead of stdout
- Temp files now use 'GenPDFAddOn' prefix. (Eg. /tmp/GenPDFAddOn1wr3C48ibd.html)
|
Version 0.3 (12 Apr 2005) |
- Added full TWiki rendering to title topic page
- Added TWiki common variable expansion to header/footer topic page
|
Version 0.2 (26 Mar 2005) |
- Fixed bug with table of contents generation (i.e. it was always generated even if
pdftoclevels was set to 0) - Now allow multiple
PDFSTART/PDFSTOP pairs within a single page to include/exclude multiple sections of the same page - Added Brent Robert's fix to allow operation with latest version (1.8.24) of HTMLDOC
|
Version 0.1 (30 Jan 2005) |
|
CPAN Dependencies: |
File::Temp (if for some reason you don't already have it installed ) |
Other Dependencies: |
HTMLDOC (http://www.htmldoc.org) |
Perl Version: |
5.005 or above |
License: |
GPL |
Add-on Home: |
http://TWiki.org/cgi-bin/view/Plugins/GenPDFAddOn |
Feedback: |
http://TWiki.org/cgi-bin/view/Plugins/GenPDFAddOnDev |
Appraisal: |
http://TWiki.org/cgi-bin/view/Plugins/GenPDFAddOnAppraisal |