Item8361: Enhancement: Add TOCTITLE parameter to GenPDFAddOn

pencil
Priority: Enhancement
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: GenPDFAddOn
Branches:
Reported By: MartinKaufmann
Waiting For:
Last Change By: GeorgeClark
When generating PDFs with a table of contents, the TOC title is called "Table of Contents". To support internationalisation, it would be preferable to be able to adjust the TOC title. HTMLDOC supports the command line parameter --toctitle. I patched GenPDF.pm ($VERSION = '$Rev: 2790 (28 Feb 2009) $';) to add the setting TOCTITLE to GenPDFAddOn's options (see attached patch file). Note, however, that the code doesn't work if the TOC title contains spaces.

I also added some character encodings to translate various arrows from HTML encoding to text strings since they are not supported by HTMLDOC (→, ←, ↔, ⇒, ⇐, ⇔).

-- MartinKaufmann - 11 Dec 2009

Thanks for contributing this. If you have access to SVN, please feel free to commit these to the current SVN version, otherwise I'll incorporate them for you. Regarding spaces, the htmldoc documentation shows use of double-quotes to delimit the string with spaces. Have you tried adding quotes to get support for spaces?

-- GeorgeClark - 12 Dec 2009

On the command-line, the double quotes work. I haven't managed, however, to adjust the code so that these double quotes survive being processed by Foswiki::Sandbox->sysCommand. I assume that this is only due to my very limited understanding of Perl (which is also the reason it might be better not to give me access to SVN...).

-- MartinKaufmann - 14 Dec 2009
 

ItemTemplate edit

Summary Enhancement: Add TOCTITLE parameter to GenPDFAddOn
ReportedBy MartinKaufmann
Codebase 1.0.7
SVN Range
AppliesTo Extension
Component GenPDFAddOn
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins GenPDFAddOn:5787fd9145a7 GenPDFAddOn:15ef50380010
ReleasedIn
Topic attachments
I Attachment Action Size Date Who Comment
GenPDF.pm.patchpatch GenPDF.pm.patch manage 3 K 11 Dec 2009 - 07:57 MartinKaufmann Patch to support TOCTITLE parameter
Topic revision: r8 - 09 Mar 2010, GeorgeClark - This page was cached on 12 Jul 2019 - 03:11.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy