Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
howto:linking_and_viewing_pdfs [2019/08/11 16:18] – ve7hzf | howto:linking_and_viewing_pdfs [2019/08/11 16:20] – ve7hzf |
---|
These brackets also work for internal files that are stored on our server (like images): | These brackets also work for internal files that are stored on our server (like images): |
^Code ^Result^ | ^Code ^Result^ |
|''%%{{howto/twometre.pdf |}}%%'' |{{howto/twometre.pdf |}}| | |''%%{{/howto/twometre.pdf |}}%%'' |{{/howto/twometre.pdf |}}| |
|''%%{{howto/twometre.pdf |Two Metre Repeaters}}%%'' |{{howto/twometre.pdf |Two Meter Repeaters}}| | |''%%{{/howto/twometre.pdf |Two Metre Repeaters}}%%'' |{{/howto/twometre.pdf |Two Meter Repeaters}}| |
| |
Using the [[https://www.dokuwiki.org/plugin:pdfjs |PDF.js Plugin]], it's also possible to display a local pdf in a window. For example, | Using the [[https://www.dokuwiki.org/plugin:pdfjs |PDF.js Plugin]], it's also possible to display a local pdf in a window. For example, |
| |
{{pdfjs 600px,300px>howto/twometre.pdf}} | {{pdfjs 600px,300px>/howto/twometre.pdf}} |
| |
gives: | gives: |
| |
{{pdfjs 600px,300px>howto/twometre.pdf}} | {{pdfjs 600px,300px>/howto/twometre.pdf}} |
| |
Note, that the width (''600px'') and length (''300px'') parameters are optional. Also, this doesn't work with external links. | Note, that the width (''600px'') and length (''300px'') parameters are optional. Also, this doesn't work with external links. |
| |
===== Export Page To PDF ===== | ===== Export Page To PDF ===== |
{{ howto/exporttopdf.png}}Finally, thanks to the [[https://www.dokuwiki.org/plugin:dw2pdf |DW2PDF Plugin]], Dokuwiki pages can be easily exported as PDFs using the PDF icon on the right hand side of the page. | {{ /howto/exporttopdf.png}}Finally, thanks to the [[https://www.dokuwiki.org/plugin:dw2pdf |DW2PDF Plugin]], Dokuwiki pages can be easily exported as PDFs using the PDF icon on the right hand side of the page. |
| |
Sometimes, it is useful to add an Export link in the text. This can be done by adding ''?do=export_pdf'' at the end of a URL. Quick caveat: counter intuitively, this time, the ''%%[[ ]]%%'' brackets must be used: | Sometimes, it is useful to add an Export link in the text. This can be done by adding ''?do=export_pdf'' at the end of a URL. Quick caveat: counter intuitively, this time, the ''%%[[ ]]%%'' brackets must be used: |
| |
^Code ^Result ^ | ^Code ^Result ^ |
|''%%[[howto/linking_and_viewing_pdfs?do=export_pdf |Export This Page to PDF]]%%'' |[[howto/linking_and_viewing_pdfs?do=export_pdf|Export This Page to PDF]]| | |''%%[[/howto/linking_and_viewing_pdfs?do=export_pdf |Export This Page to PDF]]%%'' |[[/howto/linking_and_viewing_pdfs?do=export_pdf|Export This Page to PDF]]| |
| |
But to simplify this process further and add the fancy PDF icon, I manually added ''mpdf'' -> ''%%{NAME}?do=export_pdf%%'' to the InterWiki Links configuration file with the PDF icon so that this can be used instead: | But to simplify this process further and add the fancy PDF icon, I manually added ''mpdf'' -> ''%%{NAME}?do=export_pdf%%'' to the InterWiki Links configuration file with the PDF icon so that this can be used instead: |
^Code ^Result ^ | ^Code ^Result ^ |
|''%%[[mpdf>howto/linking_and_viewing_pdfs |Export This Page to PDF]]%%'' |[[mpdf>howto/linking_and_viewing_pdfs |Export This Page to PDF]]| | |''%%[[mpdf>/howto/linking_and_viewing_pdfs |Export This Page to PDF]]%%'' |[[mpdf>/howto/linking_and_viewing_pdfs |Export This Page to PDF]]| |
| |
Or, if the page to export is the one containing the link, this works too: | Or, if the page to export is the one containing the link, this works too: |