DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:pdfexport

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
tips:pdfexport [2012-12-21 21:43] – Instructions for export link in pagetools in dokuwiki template added 78.54.131.33tips:pdfexport [2015-05-06 18:02] (current) – [Issues] 12.13.14.15
Line 1: Line 1:
-====== Export DokuWiki Page to PDFs ====== +====== Export DokuWiki Pages to PDFs ====== 
-Several users proposed a way how to convert your HTML wiki pages to PDFs.+Several methods exist to convert your wiki pages to PDFs. See also the full list of [[https://www.dokuwiki.org/plugins?plugintag=pdf#extension__table|plugins tagged 'PDF']].
  
-Current pdf export plugins:+Plugins that export directly to PDF:
   * [[plugin:dw2pdf]]   * [[plugin:dw2pdf]]
 +  * [[plugin:xslfo|XSL-FO]]
   * [[plugin:pdfex]] (old)   * [[plugin:pdfex]] (old)
   * [[plugin:html2pdf]] (broken)   * [[plugin:html2pdf]] (broken)
  
-You can also see+Other ways to generate PDFs
-  * html to pdf converter: [[tips:pdfexport:HTMLDOC]] +  * HTML to PDF converter: [[tips:pdfexport:HTMLDOC]]; or 
-  * or generate OpenOffice documents from your wiki using [[plugin:odt]]-plugin, as OpenOffice provides native export to PDF (working hyperlinks, tables, images and more).+  * Generate ODT documents from your wiki using the [[plugin:odt|ODT plugin]], as LibreOffice, OpenOffice, etc. provide means to export to PDF (with working hyperlinks, tables, images and more).
  
 ===== Common changes ===== ===== Common changes =====
 In order to export your pages to PDF you'll need to add a button to your wiki. Regardless which PDF converter you use, you need to implement the following changes: \\ In order to export your pages to PDF you'll need to add a button to your wiki. Regardless which PDF converter you use, you need to implement the following changes: \\
  
-  * Add an //Export to PDF// button by editing ''lib/tpl/main.php'' like so: <code php>+  * Add an //Export to PDF// button by editing ''lib/tpl/default/main.php'' like so: <code php>
     <div class="bar" id="bar_top">     <div class="bar" id="bar_top">
       <div class="bar-left" id="bar_topleft">       <div class="bar-left" id="bar_topleft">
Line 64: Line 65:
             </div>             </div>
 </code> </code>
-  * Edit the function ''tpl_get_action($type)'' in file ''inc/template.php'' and add the following condition:<code php>+  * Edit the ''function tpl_get_action($type)'' in file ''inc/template.php'' and add the following condition:<code php>
         case 'media':         case 'media':
 +            $params['ns'] = getNS($ID);
             break;             break;
  case 'export_pdf':        <!-- inserted line -->  case 'export_pdf':        <!-- inserted line -->
Line 78: Line 80:
 #dokuwiki__pagetools ul li a.export_pdf { #dokuwiki__pagetools ul li a.export_pdf {
     background-position: right -270px;     background-position: right -270px;
 +}
 +#dokuwiki__pagetools ul li a.export_pdf:before {
 +    margin-top: -270px;
 } }
 #dokuwiki__pagetools ul li a.export_pdf:hover, #dokuwiki__pagetools ul li a.export_pdf:hover,
Line 117: Line 122:
 This appears to only work with pages that allow anonymous read access.  This appears to only work with pages that allow anonymous read access. 
  
 +GIF images are not embedded into the generated PDF, instead only the first frame is shown.
  
 ---- ----
tips/pdfexport.1356122603.txt.gz · Last modified: 2012-12-21 21:43 by 78.54.131.33

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