|
You are here: Home / Documentation / PDF Output in Sitellite |
PDF Output in Sitellite
One of the lesser-known features Sitellite offers is the ability to
output to more formats than just plain-old HTML. This is achieved
through a concept called "output modes" (see my article How To: Templates In Sitellite
for more information about output modes), which allow you to specify
one of multiple templates to use for formatting a single page.
We'll take this a step further today and create an output mode that we
will then transform into a binary file format: a PDF.
What we'll do to format the PDF is as follows:
Step 1: Installing HTMLDocHTMLDoc is an open source utility for converting HTML pages into PDF files. This takes care of the hardest part -- making the PDF itself -- and has the advantage of allowing us to style our soon-to-be PDF files in plain-old HTML, which I'm sure most of us are more familiar with than the PHP PDF API (now that's too many acronyms!). The HTMLDoc web site is here:http://www.easysw.com/htmldoc/ Once you've downloaded the software and then uploaded it to your server, you can install it with the usual set of commands: $ bunzip2 htmldoc-1.8.3-source.tar.bz2 $ tar -xf htmldoc-1.8.3-source.tar $ cd htmldoc-1.8.3 $ ./configure $ make $ su (enter password when prompted) # make install Or if you don't have root access, you may be able to install it into your own home directory by specifying: $ ./configure --prefix=/home/USER/bin Of course, you'll want to read the actuall installation instructions before proceeding. The offical installation instructions are here: http://www.easysw.com/htmldoc/htmldoc.html#2_2 You'll know you've got it installed if you can type 'man htmldoc' and read the HTMLDoc command line instructions. Page 1: Step 1: Installing HTMLDoc |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |