Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://wiki.cs.msu.ru/bin/genpdf/System/GenPDFAddOn
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Sun Apr 10 01:57:39 2016
Êîäèðîâêà:
Table of Contents
Generate PDF Add-On......................................................................................................................................1 Usage .......................................................................................................................................................1 GenPDFPlugin helper plugin...........................................................................................................1 Configuring the Script............................................................................................................................2 General Configuration......................................................................................................................2 Limiting the PDF Generation Region..............................................................................................5 Creating and Configuring a Title Page.............................................................................................5 Creating and Configuring Headers and Footers...............................................................................5 Recursive rendering of topics...........................................................................................................6 Generating PDF from a older revision of a topic.............................................................................6 Limitations.................................................................................................................................6 PDF Logos ........................................................................................................................................6 Frequently Asked Questions...................................................................................................................7 Add-On Installation Instructions .............................................................................................................7 Before you upgrade!.........................................................................................................................7 Standard installation.........................................................................................................................7 Alternative installation.....................................................................................................................8 Configuration file settings......................................................................................................................9 Known Bugs...........................................................................................................................................9 Add-On Info............................................................................................................................................9

i


Generate PDF Add-On
Generate a PDF from a Foswiki topic or topic hierarchy This Add On to Foswiki adds a supplementary view script called genpdf. genpdf generates a PDF document using the htmldoc tool from http://www.htmldoc.org/. genpdf can generate a single topic, or a hierarchy of topics. Configuration options can control page headers and footers, and generation of cover pages. See GenPDFAddOnDemo for a demonstration of some of the PDF generation capabilities.

Usage
There are multiple ways to incorporate PDF rendering of your Foswiki topics or topic hierarchies: · The simplest way to activate PDF printing, is to add genpdf to front of the SKIN setting. This will replace the PatternSkin 'Print Version' on the lower action bar with 'Generate PDF', eliminating the HTML printable view of the topic. eg Set SKIN=genpdf,pattern (add ?skin=genpdf,pattern to the end of the URL to test) · A page can also be published by substituting genpdf for view in the topic URL. (If using short URLs, insert /bin/genpdf/ prior to the Web name). · To make it even easier for novice Foswiki users to use, you can add a link (like edit and attach) to view.tmpl to publish the current page (using the current topic as the document title). For example:
PDF

· Another option is to create a global variable that inserts a PDF ICON in the document. The following variable is expanded in the upper-right corner of this page. You can click it to get a PDF of this page. If you set this in your SitePreferences topic, it can be used in any topic.

* Set GENPDFLINK=
Generate PDF Add-On

1


· Simulated: WebHome · If Installed: WebHome

Configuring the Script
The script can be configured using URL parameters and/or web preference variables. URL parameters have precedence over web preference variables. If neither of these are present, the script will use hard-coded default variables. The general script configuration variables are explained in the next section while header/footer and title page configuration are explained in subsequent sections.

General Configuration
The following table shows the various configuration variables and their meaning. The first column gives the variable to use if passed in the URL. The second column shows the variable to use if using a Foswiki preference variable (i.e. Set VARIABLE = ). The third column gives the default value if neither the URL nor Foswiki preference variable is used. Note that URL variables have precedence over Foswiki preference variables. Foswiki preference variables must be prefixed with GENPDFADDON. %Prefixes are omitted from this table to improve the layout The HTMLDOC software and related variables, see the HTMLDOC documentation at http://www.htmldoc.org/ for detailed information
URL Variable Foswiki Preference Variable _BANNER _TITLE _SUBTITLE Default Value Example Foobar Documentation System Writing Foobars A short guide to creating foobar documents MyHeader MyTitle The name of a topic that defines headers and footers using <-- HEADER LEFT "foobar" --> syntax. See example The name of a topic that defines the layout of the title page See example The name of an attachment if specified ,becomes the title page. Allows images - see htmldoc manual pattern print over-ride the Foswiki Site CharSet. rev=10 _RECURSIVE _FORMAT pdf14 on pdf12 Generate a PDF from a prior topic revision. This disables
pdfrecursive

Explanation

pdfbanner pdftitle pdfsubtitle

Used to override the banner of a title page.

pdfheadertopic pdftitletopic pdftitledoc skin cover pdfcharset rev pdfrecursive pdfformat

_HEADERTOPIC _TITLETOPIC _TITLEDOC _SKIN _COVER _CHARSET

nat print.nat

Default skin to use for PDF generation Default cover to use for PDF generation

Include children of the base topic in the PDF HTMLDOC output format 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. The page size for PDF output The page orientation (e.g. landscape or portrait) The pixel width of the browser (used to scale images--images wider than this will be truncated)

pdftoclevels

_TOCLEVELS

5

3

pdfpagesize pdforientation pdfwidth pdfheadershift

_PAGESIZE _ORIENTATION _WIDTH _HEADERSHIFT

a4 portrait 860 0

letter landscape 1060 +3

GenPDFPlugin helper plugin

2


Shift all headers up or down (for negative values) by this amount (e.g. H1 would become H3 for a value of 2). Can also be set to auto to cause headers to shift according to the depth of recursive rendering pdfkeywords pdfsubject _KEYWORDS _SUBJECT %FORMFIELD {"KeyWords"}% %FORMFIELD {"TopicHeadline"}% 'foo, bar, baz, zip' Used for PDF Keywords META info to help search engines

'Foobar document Used for PDF Subject META info to help search engines creation' See http://www.htmldoc.org/ Default is to use the htmldoc provided string "Table of Contents". Note that a current limitation is that strings containing embedded spaces are not passed correctly. See http://www.htmldoc.org/ See http://www.htmldoc.org/ Specify font for body of document (Arial, Courier, Helvetica, Monospace, Sans, Serif, or Times Specify font for headings of document (Arial, Helvetica, Monospace, Sans, Serif, or Times Specify font for all text in document (Arial, Helvetica, Monospace, Sans, Serif, or Times .1. .1. Helvetica-Bold 12
Courier,

pdftoctitle

_TOCTITLE

Contents

pdftocheader pdftocfooter pdfbodyfont pdfheadingfont pdftextfont pdfheader pdffooter pdfheadfootfont pdfheadfootsize pdfbodyimage pdflogoimage

_TOCHEADER _TOCFOOTER _BODYFONT _HEADINGFONT _TEXTFONT _HEADER _FOOTER _HEADFOOTFONT _HEADFOOTSIZE _BODYIMAGE _LOGOIMAGE

... ..i

l.. .i.

Courier

,

Specify content of header, see http://www.htmldoc.org Specify content of footer, see http://www.htmldoc.org Font specification for headers and footers. Sets the size of the header and footer text in points (1 point = 1/72nd inch) The image that will appear tiled in the background of every page The logo that will appear in a header or footer if you specify 'l' in the string (see http://www.htmldoc.org)

pdfnumberedtoc _NUMBEREDTOC

True

Option flag for getting numbered headings and Table of Contents. Set it to anything for 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. PDF Security permissions to disable print/copy etc. By default the PDF is not protected.

pdfduplex

_DUPLEX

True

pdfpermissions

_PERMISSIONS

print,no-copy top:0.5in, bottom:2.5cm, left:12pt, right:15mm #CCff99

pdfmargins

_MARGINS

Specify the page margins (white space to edge of page)

pdfbodycolor

_BODYCOLOR

Specify the background colour of all pages 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 Should PDF Metadata include the Foswiki %WEBCOPYRIGHT% or another value. If set to 0, copyright is excluded. If set to any other string, the string is included in the metadata. Htmldoc has a bug and appends the copyright to the author metadata, which can break some document management systems that depend on the metadata. Set to 0 to exclude the copyright from the PDF metadata. Include debug messages and don't clean up temporary files after execution First page viewer will open: page; c1 first chapter.
toc

pdfstruct

_STRUCT

book

webpage

pdfcopyright

_COPYRIGHT

%WEBCOPYRIGHT%

Copyright 2009

pdfdebug pdffirstpage pdfdestination pdfpagelayout pdfpagemode

_DEBUG _FIRSTPAGE _DESTINATION _PAGELAYOUT _PAGEMODE

0 toc view single outline

1

table of contents;

p1

first

Output to browser window or save-as prompt View's initial presentation layout:
tworight single, one, twoleft,

General Configuration

3


Viewer's initial presentation mode:
fullscreen

outline, document

,

pdfcompress

_COMPRESS

9

Set compression level of the document. 1=minimum, 9=maximum, none to disable compression Set JPEG image quality. Lower quality is higher compression. Set to none to disable JPEG image compression

pdfjpegquality

_JPEGQUALITY

80

If using Foswiki preference variables, copy them to the appropriate web preferences page. This plugin does not read settings from this topic! · Settings for the GenPDFAddOn Plugin #Set GENPDFADDON_BANNER = #Set GENPDFADDON_TITLE = #Set GENPDFADDON_SUBTITLE = #Set GENPDFADDON_HEADERTOPIC = #Set GENPDFADDON_TITLETOPIC = #Set GENPDFADDON_TITLEDOC = #Set GENPDFADDON_SKIN = #Set GENPDFADDON_COVER = #Set GENPDFADDON_CHARSET = #Set GENPDFADDON_RECURSIVE = #Set GENPDFADDON_FORMAT = #Set GENPDFADDON_TOCLEVELS = #Set GENPDFADDON_PAGESIZE = #Set GENPDFADDON_ORIENTATION = #Set GENPDFADDON_WIDTH = #Set GENPDFADDON_HEADERSHIFT = #Set GENPDFADDON_KEYWORDS = #Set GENPDFADDON_SUBJECT = #Set GENPDFADDON_TOCTITLE = #Set GENPDFADDON_TOCHEADER = #Set GENPDFADDON_TOCFOOTER = #Set GENPDFADDON_BODYFONT = #Set GENPDFADDON_HEADINGFONT = #Set GENPDFADDON_TEXTFONT = #Set GENPDFADDON_HEADER = #Set GENPDFADDON_FOOTER = #Set GENPDFADDON_HEADFOOTFONT = #Set GENPDFADDON_HEADFOOTSIZE = #Set GENPDFADDON_BODYIMAGE = #Set GENPDFADDON_LOGOIMAGE = #Set GENPDFADDON_NUMBEREDTOC = #Set GENPDFADDON_DUPLEX = #Set GENPDFADDON_PERMISSIONS = #Set GENPDFADDON_MARGINS = #Set GENPDFADDON_BODYCOLOR = #Set GENPDFADDON_TEMPLATE = #Set GENPDFADDON_COPYRIGHT = #Set GENPDFADDON_DEBUG = #Set GENPDFADDON_FIRSTPAGE = #Set GENPDFADDON_DESTINATION = #Set GENPDFADDON_PAGELAYOUT = #Set GENPDFADDON_PAGEMODE = #Set GENPDFADDON_COMPRESS = 4

General Configuration


#Set GENPDFADDON_JPEGQUALITY =

Limiting the PDF Generation Region
The add-on allows the user to define the region of the topic that should be included in the PDF generation (much like the Foswiki %STARTINCLUDE% and %STOPINCLUDE% variables. In this case, HTML comments are used instead. Everything between these two comments will be included in the PDF generation. The rest of topic will be excluded. · Use to mark the starting point in the topic for PDF generation. · Use to mark the stopping point in the topic for PDF generation. Note that there can be multiple PDFSTART and PDFSTOP comment pairs in a single topic to selectively include/exclude multiple sections of the topic in the PDF document. (If you view this page in raw mode or edit it, you'll see an example of multiple PDFSTART/PDFSTOP sections to exclude the Foswiki table of contents). If no PDFSTART/PDFSTOP comment pair appears in the topic, the entire topic text is used. In general, this should not be a problem except for title topics that include forms as the form meta-data will show up in a fairly illegible manner at the end of the document. Therefore, for topics that reference forms, a PDFSTART comment should be placed at the beginning of the topic and a PDFSTOP should be placed at the end. NOTE: all %META: tags are removed from the base topic. If you want to display form data, you should add %FORMFIELD{"field"}% tags to the topic or title topic.

Creating and Configuring a Title Page
The add-on allows the user to use a topic as a title page for PDF generation. Earlier versions of the add-on required that the title page be expressed using pure HTML as the title page topic was not Foswiki rendered. The latest version of add-on, however, does full Foswiki rendering of the title topic page like any other Foswiki topic. In addition, the following variables can be passed with the URL to override their settings elsewhere (e.g. in the web preferences or Foswiki preferences pages). Also note that the PDFSTART and PDFSTOP HTML comments should be placed at the beginning and end of title topic. An example title page can be found at GenPDFExampleTitleTopic.

Creating and Configuring Headers and Footers
The add-on also allows the user to configure header and footer formats for both the main section of the document and the table of contents. Configuring the main header and footer is much like configuring a title page. You can select a Foswiki topic to use for the header and footer. Remember to wrap the HTML comments that HTMLDOC uses for the header and footer between and tags. The add-on will perform Foswiki common variable substition within the HTMLDOC header/footer HTML comments. This will allow Foswiki variables (such as %REVINFO{web="%WEB%" topic="%BASETOPIC%"}%) to be embedded in the headers and footers. See the HTMLDOC documentation at http://www.htmldoc.org for details of the format of the header and footers. In addition, the genpdf script will perform variable substition for the %GENPDFADDON _BANNER%, %GENPDFADDON _TITLE%, and %GENPDFADDON _SUBTITLE% variables as it does for the title page. Finally, the PDFSTART and PDFSTOP HTML comments should be placed at the beginning and end of header/footer topic. An example header/footer page can be found at GenPDFExampleHeaderFooterTopic. Note that HTMLDOC will not generate a page header on any page generated by a Level 1 header (---+ header). This is a known issue in htmldoc through version 1.27. A patch is provided further on in this page. Limiting the PDF Generation Region 5


Recursive rendering of topics
The add-on can search and recursively render all child topics of the requested topic in the same web. Use the "More topic actions" -> "Set New Topic Parent" menu to establish or modify the parent/child relationships of topics. · The default behavior is to render each topic as a separate chapter. A level 1 heading will be added as required to each topic. · Child topics are sorted into alphabetical order by topic name · If the pdfheadershift option is set to auto, then the first header in each topic will be set to the absolute depth of the child topic in the tree. In this case the PDF will consist of only a single chapter. · Any topic can be promoted a level in the hierarchy by including the HTML comment anywhere in the topic. Promoted Child topics will appear after all other children have been expanded. The actual parent of the topic is not changed, so topics cannot be promoted more than one level without breaking the topic sort order. · Child topics are not found across web boundarys. For example, if you create a ParentTopic, then create FirstChild and SecondChild with ParentTopic as their parent topic, then create GrandChildOne with FirstChild as its parent (and so on), you get a tree as shown below. In addition the PDF TOC layout is shown for the various headershift options:
pdfheadershift=auto

Wiki Structure
ParentTopic - FirstChild - GrandChildOne - GrandChildTwo - SecondChild - GrandChildThree - ThirdChild

Default Rendering pdfheadershift=auto
1 2 3 4 5 6 7 ParentTopic FirstChild GrandChildOne GrandChildTwo SecondChild GrandChildThree ThirdChild 1 ParentTopic 1.1 FirstChild 1.1.1 GrandChildOne 1.1.2 GrandChildTwo 1.2 SecondChild 1.2.1 GrandChildThree 1.3 ThirdChild



in

SecondChild
1 ParentTopic 1.1 FirstChild 1.1.1 GrandChildOne 1.1.2 GrandChildTwo 1.2 ThirdChild 2 SecondChild 2.1 GrandChildThree

Generating PDF from a older revision of a topic.
The latest release of the GenPDFAddOn supports generating a PDF of a previous revision of a topic. Include the rev=xx parameter on the URL in the same format that you would view an older topic revision. Limitations · Specifying a topic revision will disable the recursive option. · The revision is only applied to the primary topic. All other related topics - title pages, includes, attachments, etc. use the current revision. · Any in-topic settings GENPDFADDON_* will be taken from the curent version and not from the requested topic revision.

PDF Logos
The following Public Domain PDF Icons can be used to represent PDF files: · 32x32 Images pdf-32.gif pdf-32.png

Recursive rendering of topics

6


· 64x64 Images

pdf-64.gif pdf-64.png

Frequently Asked Questions
How do I stop the table of contents from being generated? For some topics, like User topics, it doesn't make any sense to have a table of contents generated so add 'pdftoclevels=0' as a URL parameter. When I do a recursive PDF of WebHome it doesn't include all topics That's because some topics distributed with Foswiki don't have a parent association. If you really want to include every topic in the web, you should reparent them all with WebHome as the parent. Ocassionally no PDF document is generated The default structure of book requires that headings be present in the topic. Try setting
pdfstruct=webpage

Add-On Installation Instructions
Note: In order to view PDF files generated by this Add On, you will need to install a PDF viewer such as Adobe Acrobat in the user's browsers. The following instructions are for the administrator who installs the add-on on the server where Foswiki is running.

Before you upgrade!
This version moves the GenPDFAddOn examples and demo topics from the %System web to the Sandbox web. Old versions of these topics can be removed %from the System web after the upgrade. · The hard-coded pdftoclevel=0 in the view.genpdf.tmpl file has been removed. An alternative approach is to set GENPDFADDON_TOCLEVELS=0 in SitePreferences · This version ships with a GenPDFPlugin. This is a helper plugin which will expand the %GENPDF% tag, and does not need to be enabled. See GenPDFPlugin for more information · This version renames lib/Foswiki/Contrib/GenPDF.pm to lib/Foswiki/Contrib/GenPDFAddOn.pm A shim version of GenPDF.pm is shipped so that ·
existing configurations will still work without requiring any configuration changes to =lib/LocalSite.cfg

Standard installation
· Install htmldoc from http://www.htmldoc.org/ (optionally use the patch in the Addon's zip file for headers on every page) · Access the bin/configure script - Extensions tab, click "Find Extensions", locate GenPDFAddOn in the table and click "Install" · In the bin/configure script, visit the GenPDFAddOn settings and optionally set the path to the htmldoc command. If this is not set, the plugin will look for htmldoc in the default path. You must go through a save cycle in bin/configure in order to set the required hidden Switchboard entry even if you have not changed any settings! · Windows Users: Edit the bin/genpdf script and update the "shebang" #!/bin/perl to match your system perl location Example: #!C:\strawberry\perl\bin\perl.exe · Important Security considerations The genpdf script should be added to the AuthScripts list in bin/configure PDF Logos 7


if you use Apache user authentication, be sure to also add genpdf to the list of restricted scripts in the apache configuration. · Copy any desired preferences from above and paste them into SitePreferences, or the WebPreferences topic for a single web. · Test if the installation was successful: Try loading this page If you get a 404 - not found, make sure that a switchboard entry exists in LocalSite.cfg. If it doesn't work, check your webserver logs for any problems. The most common issue is probably an htmldoc installation problem. Another test topic is found in Sandbox/GenPDFAddOnDemo

Alternative installation
· Download the tgz or zip file and the GenPDFAddOn_installer file from the Add-on Home (see below) · Run the installer ( perl GenPDFAddOn _installer ) or unzip GenPDFAddOn.zip in your Foswiki installation directory · Adjust the script ownership to match your webserver configuration (e.g. chown nobody genpdf) if needed. · Make sure the script is executable (e.g chmod 755 genpdf). · Adjust the perl path in the genpdf script to match your perl installation location. · Configure the $Foswiki::cfg{Extensions}{GenPDFAddOn}{htmldocCmd} = "/path/to/htmldoc"; using configure (in the Extensions section) You must visit and save the Foswiki configuration at least once after installation to set a hidden variable in the LocalSite.cfg file See the Configuration file settings below. File:
bin/genpdf data/System/GenPDFAddOn.txt data/System/GenPDFAddOnPlugin.txt data/System/VarGENPDF.txt data/Sandbox/GenPDFAddOnDemo.txt data/Sandbox/GenPDFAddOnDemoChild.txt data/Sandbox/GenPDFAddOnDemoChild2.txt data/Sandbox/GenPDFAddOnDemoForm.txt data/Sandbox/GenPDFExampleHeaderFooterTopic.txt data/Sandbox/GenPDFExampleTitleTopic.txt pub/System/GenPDFAddOn/pdf-32.gif pub/System/GenPDFAddOn/pdf-32.png pub/System/GenPDFAddOn/pdf-64.gif pub/System/GenPDFAddOn/pdf-64.png htmldoc_force_header.patch lib/Foswiki/Contrib/GenPDF.pm lib/Foswiki/Contrib/GenPDFAddOn.pm lib/Foswiki/Contrib/GenPDFAddOn/Config.spec lib/Foswiki/Plugins/GenPDFAddOnPlugin.pm templates/view.genpdf.tmpl

Description: Add-on topic Helper plugin topic Defines GENPDF macro Demonstration topic Demo child for recursive rendering Demo child for recursive rendering Document classification form

Shim module to avoid breaking old installations Renamed GenPDF.pm to packaging standards

Standard installation

8


Configuration file settings
The following settings should be built automatically by bin/configure.
$Foswiki::cfg{Extensions}{GenPDFPlugin}{htmldocCmd} = '/usr/bin/htmldoc'; $Foswiki::cfg{SwitchBoard}{genpdf} = { 'function' => 'viewPDF', 'context' => { 'view' => 1 'static' => 1 }, 'package' => 'Foswiki::Contrib::GenPDF' };

Known Bugs
· Verbatim text runs off the page. This is a limitation of HTMLDOC. Preformatted text may run off the edge of the page and be truncated. · HTMLDOC crashes with segmentation faults. Eg it fails to generate CompleteDocumentation. I managed to get it to work a few times, but it generally fails. The error returned is Conversion
failed: 'Inappropriate ioctl for device' at /var/www/Foswiki/lib/Foswiki/Contrib/GenPDF.pm line XXX

· Some pages don't have a header. HTMLDOC breaks the page for every level 1 heading (Eg.

) but it doesn't write a header for the new page, so topics with lots of level 1 headings and not much content don't seem to have any headers. Therefore I patched htmldoc-1.8.24 to force a header for every new page:
*** htmldoc-1.8.24/htmldoc/ps-pdf.cxx Sat Oct 30 05:53:59 2004 --- htmldoc-1.8.24/htmldoc/ps-pdf_force_header.cxx Tue Jun 13 02:12:28 2005 *************** *** 1465,1471 **** pspdf_prepare_heading(page, print_page, pages[page].header, top, page_text, sizeof(page_text), ! page > chapter_starts[chapter] || OutputType != OUTPUT_BOOK); pspdf_prepare_heading(page, print_page, pages[page].footer, 0, page_text, sizeof(page_text)); --- 1465,1472 ---pspdf_prepare_heading(page, print_page, pages[page].header, top, page_text, sizeof(page_text), page > chapter_starts[chapter] || */ 1 || /* force heading onto chapter front page */ OutputType != OUTPUT_BOOK); pspdf_prepare_heading(page, print_page, pages[page].footer, 0, page_text, sizeof(page_text));

! /* !

Add-On Info
Add-on Author: Copyright: License: Release: Version: Change History: Foswiki:Main/BrianSpinar, Foswiki:Main/WadeTurland, Foswiki:Main/GeorgeClark \A9 2009-2013, Foswiki Contributors GPL (GNU General Public License) 1.3 1.3

Configuration file settings

9


Release 1.3 FoswikiTask:Item9984 - fix FastCGI operation, FoswikiTask:Item11843: 4 Aug 2013 GenPDFAddon utf-8 patch and FoswikiTask:Item11013: GenPDFAddOn does not honor {Site}{CharSet}. 14 May 2010 Release 1.2 Foswikitask:Item9008 - Remove the X-Foswiki headers from the response. Release 1.1 Foswikitask:Item8586 - resolve packaging issue, Foswikitask:8575 - Add a 9 Mar 2010 "static" context to allow other plugins to recognize pdf output, Foswikitask:Item8691: Add support for heading and body fonts Foswikitask:Item559 - Correct handing of embedded images, Foswikitask:Item1599 Improve compatibility with EditTable, Foswikitask:Item2084 - Add support of topic revisions, Foswikitask:Item2435 - Correct DEPENDENCIES file, Foswikitask:Item2492 support configurable image compression, Foswikitask:Item2592 - Correct issues with 6 Feb 2010 Examples, and handling of missing images, Foswikitask:Item2604 - Improve handling of TOC for recursive rendering, Foswikitask:Item8081 - Support passing %MACROS% in GENPDF settings, Foswikitask:Item8090 - Remove pdftoclevels from view.genpdf.tmpl, Foswikitask:Item8361 - Add support for TOC Title, and improve handling of HTML arrows. Foswikitask:Item1174 - Initial release of GenPDFPlugin helper 28 Feb 2009 Added missing Config.spec file Item1161: GenPDFAddOn result in "Not Found" page Conversion to Foswiki. Better tmpdir to specify the default directory for temporary files · Redirect to 'oops' URLs if permission denied or topic does not exist. · Removed foswikiNewLink 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.6 (28 Jun 2005)

Version 0.5 (16 Jun 2005)

Add-On Info

10


Version 0.4 (13 Jun 2005)

· · · · · · ·

· · · · · · · Version 0.3 (12 Apr 2005)

Better security (now calls system($Foswiki::htmldocCmd, @htmldocArgs) ) Checks return code of htmldoc and returns an error on failure Validation of preferences Preferences changed to comply with Plugins 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)

· Added full Foswiki rendering to title topic page · Added Foswiki common variable expansion to header/footer topic page · 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.2 (26 Mar 2005)

Version 0.1 (30 Jan 2005) · Initial version Home: http://foswiki.org/Extensions/GenPDFAddOn Support: http://foswiki.org/Support/GenPDFAddOn Name CGI Data::Dumper Dependencies: Error File::Temp htmldoc Version >=0 >=0 >=0 >=0 Description May be required for lib/Foswiki/Contrib/GenPDF.pm May be required for lib/Foswiki/Contrib/GenPDF.pm May be required for lib/Foswiki/Contrib/GenPDF.pm May be required for lib/Foswiki/Contrib/GenPDF.pm Obtain from http://www.htmldoc.org/software.php

Related Topics: GenPDFAddOnDemo, GenPDFExampleHeaderFooterTopic, GenPDFExampleTitleTopic, GenPDFAddOnDemoChild GenPDFAddOnDemoChild2 GenPDFAddOnDemoForm

Add-On Info

11