--- GenPDF.pm.orig 2009-03-01 02:53:55.000000000 +0100 +++ GenPDF.pm 2009-11-05 19:33:21.000000000 +0100 @@ -354,6 +354,13 @@ $text =~ s/&[lr]dquo;/"/g; #" $text =~ s/&[lr]squo;/'/g; #' $text =~ s/¦/|/g; + # replace arrows + $text =~ s/→/->/g; + $text =~ s/←/<-/g; + $text =~ s/↔/<->/g; + $text =~ s/⇒/=>/g; + $text =~ s/⇐/<=/g; + $text =~ s/⇔/<=>/g; # convert FoswikiNewLinks to normal text # FIXME - should this be a preference? - should use setPreferencesValue($name, $val) to set NEWTOPICLINK @@ -496,6 +503,7 @@ . $imgInfo->{web} . " " . $imgInfo->{topic} . " " . $imgInfo->{file} ); + _writeDebug("File Access Exception: $imgInfo->{topic} $imgInfo->{file}"); }; # replace all instances of url with the temporary filename @@ -616,6 +624,14 @@ $html =~ s/&[lr]dquo;/"/g; #" $html =~ s/&[lr]squo;/'/g; #' $html =~ s/¦/|/g; + # replace arrows + $html =~ s/→/->/g; + $html =~ s/←/<-/g; + $html =~ s/↔/<->/g; + $html =~ s/⇒/=>/g; + $html =~ s/⇐/<=/g; + $html =~ s/⇔/<=>/g; + # convert FoswikiNewLinks to normal text # FIXME - should this be a preference? - should use setPreferencesValue($name, $val) to set NEWTOPICLINK @@ -686,6 +702,7 @@ use constant HEADERSHIFT => 0; use constant KEYWORDS => '%FORMFIELD{"KeyWords"}%'; use constant SUBJECT => '%FORMFIELD{"TopicHeadline"}%'; + use constant TOCTITLE => "TOC"; use constant TOCHEADER => "..."; use constant TOCFOOTER => "..i"; use constant HEADER => undef; @@ -773,7 +790,10 @@ || STRUCT; $prefs{'struct'} = STRUCT unless $prefs{'struct'} =~ /^(book|webpage|continuous)$/o; - + # TOC Title + $prefs{'toctitle'} = $query->param('pdftoctitle') + || Foswiki::Func::getPreferencesValue("GENPDFADDON_TOCTITLE"); + $prefs{'toctitle'} = TOCTITLE unless defined $prefs{'toctitle'}; # Get TOC header/footer. Set to default if nothing useful given $prefs{'tocheader'} = $query->param('pdftocheader') || Foswiki::Func::getPreferencesValue("GENPDFADDON_TOCHEADER") @@ -1074,9 +1094,11 @@ } else { push @htmldocArgs, "--numbered" if $prefs{'numbered'}; - push @htmldocArgs, "--toclevels", "$prefs{'toclevels'}", "--tocheader", - "$prefs{'tocheader'}", "--tocfooter", "$prefs{'tocfooter'}", - "--firstpage", $prefs{'firstpage'}; + push @htmldocArgs, "--toclevels", "$prefs{'toclevels'}", + "--tocheader", "$prefs{'tocheader'}", + "--tocfooter", "$prefs{'tocfooter'}", + "--toctitle", "$prefs{'toctitle'}", + "--firstpage", "$prefs{'firstpage'}"; } push @htmldocArgs, "--duplex" if $prefs{'duplex'}; push @htmldocArgs, "--bodyimage", "$prefs{'bodyimage'}" @@ -1110,6 +1132,7 @@ my ( $Output, $exit ) = Foswiki::Sandbox->sysCommand( $htmldocCmd . ' ' . join( ' ', @htmldocArgs ) ); + _writeDebug("htmldoc exited with $exit"); if ( !-e $outputFile ) { die "error running htmldoc ($htmldocCmd): $Output\n";