• 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.
If I have a wiki topic that is named Topic. I have link in that topic to another topic named TopicExample.

In this case the genPdf _fixhtml code gets too greedy trying to create internal links as opposed to external links back to the wiki website.. In particular, on line 364, there is the line..

      $html =~ s/$url(?!#)/#$wikiword/g; # not anchored
In this case, the url is something like http://wiki/twiki/bin/view/MyWeb/Topic The link in the file for TopicExample is http://wiki/twiki/bin/view/MyWeb/TopicExample This matches the above perl line and the first part (everything except Example) gets replaced by $wikiword (Topic in this case), So I end up with a link in the pdf that looks like #TopicExample, not an external link I intended.

My solution for this is to look for beginning and end quotes around the $url and only do the replace if there are quotes around the url.

  $html =~ s/([\'\"])$url\1/\1#$wikiword\1/g; # not anchored

-- TWiki:Main/KevinKalmbach - 01 Feb 2007

Another issue that causes breaks is that TWiki (4.0.5) leaves "<nop>" tags in the output HTML. These aren't needed by htmldoc. More to the point, they can break some of the REs used in GenPDF.pm. This line (in _fixHtml) removes them:

     $html =~ s/<nop>//g
Summary fix to HTML
ReportedBy TWiki:Main.KevinKalmbach
Codebase 4.0.5
SVN Range TWiki-4.1.1, Tue, 30 Jan 2007, build 12650
AppliesTo Extension
Component GenPDFAddOn
Priority Normal
CurrentState Closed

Checkins TWikirev:13196 TWikirev:13197 TWikirev:13203
TargetRelease n/a

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2007-04-03 - RamamohanT
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