• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4916: New header and footer controls

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension GenPDFAddOn Enhancement Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Have added 3 attributes, HEADFOOTSIZE, HEADER and FOOTER (see attached)

--- /old/lib/TWiki/Contrib/GenPDF.pm   2007-08-31 20:58:41.000000000 +0200
+++ /new/lib/TWiki/Contrib/GenPDF.pm   2007-10-10 21:32:20.037219596 +0200
@@ -410,6 +410,9 @@
        TOCHEADER => "...",
        TOCFOOTER => "..i",
        HEADFOOTFONT => "",
+       HEADFOOTSIZE => undef,
+       HEADER => undef,
+       FOOTER => undef,
        BODYIMAGE => "",
        LOGOIMAGE => "",
        NUMBEREDTOC => undef,
@@ -463,6 +466,15 @@
    $prefs{'headfootfont'} = HEADFOOTFONT unless ($prefs{'headfootfont'} =~
       /^(times(-roman|-bold|-italic|bolditalic)?|(courier|helvetica)(-bold|-oblique|-boldoblique)?)$/);
 
+   $prefs{'headfootsize'} = $query->param('pdfheadfootsize') || TWiki::Func::getPreferencesValue("GENPDFADDON_HEADFOOTSIZE") || '';
+   $prefs{'headfootsize'} = HEADFOOTSIZE unless ($prefs{'headfootsize'} =~ /^\d+$/);
+
+   $prefs{'header'} = $query->param('pdfheader') || TWiki::Func::getPreferencesValue("GENPDFADDON_HEADER") || '';
+   $prefs{'header'} = HEADER unless ($prefs{'header'} =~ /^[\.\/:1aAcCdDhiIltT]{3}$/);
+
+   $prefs{'footer'} = $query->param('pdffooter') || TWiki::Func::getPreferencesValue("GENPDFADDON_FOOTER") || '';
+   $prefs{'footer'} = FOOTER unless ($prefs{'footer'} =~ /^[\.\/:1aAcCdDhiIltT]{3}$/);
+
    $prefs{'width'} = $query->param('pdfwidth') || TWiki::Func::getPreferencesValue("GENPDFADDON_WIDTH") || '';
    $prefs{'width'} = WIDTH unless ($prefs{'width'} =~ /^\d+$/);
 
@@ -677,6 +689,9 @@
    push @htmldocArgs, "--bodyimage", "$prefs{'bodyimage'}" if $prefs{'bodyimage'};
    push @htmldocArgs, "--logoimage", "$prefs{'logoimage'}" if $prefs{'logoimage'};
    push @htmldocArgs, "--headfootfont", "$prefs{'headfootfont'}" if $prefs{'headfootfont'};
+   push @htmldocArgs, "--headfootsize", "$prefs{'headfootsize'}" if $prefs{'headfootsize'};
+   push @htmldocArgs, "--header", "$prefs{'header'}" if $prefs{'header'};
+   push @htmldocArgs, "--footer", "$prefs{'footer'}" if $prefs{'footer'};
    push @htmldocArgs, "--permissions", "$prefs{'permissions'}" if $prefs{'permissions'};
    push @htmldocArgs, "--bodycolor", "$prefs{'bodycolor'}" if $prefs{'bodycolor'};
    push @htmldocArgs, "--top", "$prefs{'top'}" if $prefs{'top'};

Gives more control on what appears in header and footer. smile

-- KwangErnLiew - 10 Oct 2007

ItemTemplate
Summary New header and footer controls
ReportedBy TWiki:Main.RickMach
Codebase

SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Extension
Component GenPDFAddOn
Priority Enhancement
CurrentState Closed
WaitingFor

Checkins TWikirev:15468 TWikirev:15469
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-11-05 - RickMach
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback