| | | |
| ## wiki_pdf_generation_cachedir | | ## wiki_pdf_generation_cachedir |
| | | |
| This is the "cachedir" where generated PDF files ( | | This is the "cachedir" where generated PDF files ( |
| and .xhtml files) will be stored. | | and .xhtml files) will be stored. |
| | | |
t | | t | # Methods
|
| | |
|
| | | The wiki snip contains a method 'pdf_enabled()' wh |
| | | ich will return True or False depending if PDF gen |
| | | eration is enabled (for the current user).
|
| | |
|
| | | An example usage would be (in a template like show |
| | | Snip.html):
|
| | |
|
| | | {% if snip.pdf_enabled %}<a href="{{ snip.get_ |
| | | absolute_pdfurl }}">Download PDF</a>{% endif %}
|
| | | |
| # Considerations | | # Considerations |
| | | |
| The generation of PDF files using XSLT and XSL-FO | | The generation of PDF files using XSLT and XSL-FO |
| is very performance expensive and can take a few s | | is very performance expensive and can take a few s |
| econds 100% CPU. Since PDF files are generated on | | econds 100% CPU. Since PDF files are generated on |
| the fly if they are not already cached (or if the | | the fly if they are not already cached (or if the |
| wiki snip has changed since the last generation) - | | wiki snip has changed since the last generation) - |
| you should considering only enabling this feature | | you should considering only enabling this feature |
| for logged in users or staff. | | for logged in users or staff. |
| | | |