PDF Generation
Wiki / PDFGenerationBack to Snip <-- Previous Change | Next Change -->
| Diff Summary | |||||
|---|---|---|---|---|---|
| Title | |||||
| Date | 2007-06-10 21:56:08 | 2007-06-10 21:58:10 | |||
| Editor | Herbert Poul | Herbert Poul | |||
| Tags | |||||
| 2007-06-10 21:56:08 by Herbert Poul | 2007-06-10 21:58:10 by Herbert Poul | ||||
|---|---|---|---|---|---|
| 49 | 49 | ||||
| 50 | ## wiki_pdf_generation_cachedir | 50 | ## wiki_pdf_generation_cachedir | ||
| 51 | 51 | ||||
| 52 | This is the "cachedir" where generated PDF files ( | 52 | This is the "cachedir" where generated PDF files ( | ||
| > | and .xhtml files) will be stored. | > | and .xhtml files) will be stored. | ||
| 53 | 53 | ||||
| t | t | 54 | # Methods | ||
| 55 | |||||
| 56 | 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). | ||||
| 57 | |||||
| 58 | An example usage would be (in a template like show | ||||
| > | Snip.html): | ||||
| 59 | |||||
| 60 | {% if snip.pdf_enabled %}<a href="{{ snip.get_ | ||||
| > | absolute_pdfurl }}">Download PDF</a>{% endif %} | ||||
| 54 | 61 | ||||
| 55 | # Considerations | 62 | # Considerations | ||
| 56 | 63 | ||||
| 57 | The generation of PDF files using XSLT and XSL-FO | 64 | 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. | ||
| 58 | 65 | ||||
Powered by Sphene Community Tools
