GenPDF doesn't output images - sometimes.
Turns out that it doesn't tolerate src and href with single quotes. Other things don't tolerate them with double.
Fix is in
GenPDF.pm
--- GenPDF.pm.base 2008-10-31 15:53:43.000000000 -0400
+++ GenPDF.pm 2008-12-23 17:41:49.000000000 -0500
@@ -288,14 +288,14 @@
# certificates.
# Fully qualify any unqualified URLs (to make it portable to another host)
my $url = TWiki::Func::getUrlHost();
my $pdir = TWiki::Func::getPubDir();
my $purlp = TWiki::Func::getPubUrlPath();
- $text =~ s!<img(.*?) src="($url)?$purlp!<img$1 src="$pdir\/!sgi;
- $text =~ s/<a(.*?) href="(?!#)\//<a$1 href="$url\//sgi;
+ $text =~ s!<img(.*?) src=(["'])($url)?$purlp!<img$1 src=$2$pdir\/!sgi;
+ $text =~ s/<a(.*?) href=(['"])(?!#)\//<a$1 href=$2$url\//sgi;
# Save it to a file
my ($fh, $name) = tempfile('GenPDFAddOnXXXXXXXXXX',
DIR => File::Spec->tmpdir(),
SUFFIX => '.html');
open $fh, ">$name";
@@ -411,14 +411,14 @@
# images. Needed if wiki requires authentication like SSL client certifcates.
# Fully qualify any unqualified URLs (to make it portable to another host)
my $url = TWiki::Func::getUrlHost();
my $pdir = TWiki::Func::getPubDir();
my $purlp = TWiki::Func::getPubUrlPath();
- $html =~ s!<img(.*?) src="($url)?$purlp!<img$1 src="$pdir\/!gi;
- $html =~ s/<a(.*?) href="\//<a$1 href="$url\//gi;
+ $html =~ s!<img(.*?) src=(["'])($url)?$purlp!<img$1 src=$2$pdir\/!gi;
+ $html =~ s/<a(.*?) href=(['"])\//<a$1 href=$2$url\//gi;
# link internally if we include the topic
for my $wikiword (@$refTopics) {
$url = TWiki::Func::getScriptUrl($webName, $wikiword, 'view');
$html =~ s/([\'\"])$url/$1#$wikiword/g; # not anchored
$html =~ s/$url(#\w*)/$1/g; # anchored
}
--
TWiki:Main/TimotheLitt - 23 Dec 2008