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
tips:pdfexport:htmldoc [2023-02-28 07:36] – Link to new dokuwiki repo saggitips:pdfexport:htmldoc [2023-03-08 08:21] (current) 2409:4070:4387:9f60:5d3e:e9b4:db59:c826
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 by using [[https://jpegcompress.com|Jpeg compressor]].+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
 <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
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