DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:pdfexport:htmldoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:pdfexport:htmldoc [2009-10-31 20:15] 90.184.79.243tips:pdfexport:htmldoc [2022-07-05 08:31] – minor edit 183.82.239.152
Line 150: Line 150:
 header("Content-Disposition: attachment; filename=wikiexport" . str_replace(':','_',$_GET["id"]) . ".pdf"); header("Content-Disposition: attachment; filename=wikiexport" . str_replace(':','_',$_GET["id"]) . ".pdf");
 </code> </code>
-To retrieve images from the wiki server (relative links, hope that it won't cause security issues) (I had problems with PNG files, so I converted them into JPEG format).+To retrieve images from the wiki server (relative links, hope that it won't cause security issues) (I had problems with PNG files, so I converted them into JPEG format by using [[https://jpegcompress.com|Jpeg compressor]].
 <code xml> <code xml>
 $text = preg_replace("'<img src=\"/(.*?)/lib/exe/fetch.php(.*?)media=(.*?)\"(.*?)>'si","<img src=\"http://" . $_SERVER['SERVER_NAME'] . "/\\1/data/media/\\3\">", $text); # for uploaded images $text = preg_replace("'<img src=\"/(.*?)/lib/exe/fetch.php(.*?)media=(.*?)\"(.*?)>'si","<img src=\"http://" . $_SERVER['SERVER_NAME'] . "/\\1/data/media/\\3\">", $text); # for uploaded images
Line 814: Line 814:
  
 you have to declare all value in your ''config.metadata.php'' you have to declare all value in your ''config.metadata.php''
 +
 +===== Changes to the TOC =====
 +
 +Some recent changes in the core will break all the TOC-related code above, because [[https://github.com/splitbrain/dokuwiki/commit/d5acc30de20298eb6ed7545e70484599c4d95867|the HTML for the TOC has been rewritten]]. The changes will be part of DokuWiki from the next release on (autumn 2012).
 +
tips/pdfexport/htmldoc.txt · Last modified: 2023-03-08 08:21 by 2409:4070:4387:9f60:5d3e:e9b4:db59:c826

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki