|
You are here: Home / Documentation / PDF Output in Sitellite |
PDF Output in SitelliteStep 2: Creating a New Output ModeThis step is really quick: Simply copy your html.default.tpl template in your currently active template set and name the new file pdf.default.tpl.Step 3: Designing the PDF OutputAn example template named pdf.default.tpl is already present in the default template set that Sitellite comes with. This can be used as the basis of designing your own. I'll briefly go over the main parts that pertain to us:HTMLDoc allows you to pass formatting directives to its HTML-to-PDF converter in the form of HTML comment tags. These allow you to do things like automatically insert a standard header or footer into every page. The ones we see in the example page include: <xt:note>HEADER LEFT "SCM example site"</xt:note> This specifies text to be placed into the left side of the header. <xt:note>HEADER RIGHT "Driving Web Content Management"</xt:note> This specifies text to be placed into the right side of the header. <xt:note>FOOTER LEFT "$HEADING"</xt:note> This specifies text to be placed into the left side of the footer. Note the $HEADING variable, which tells HTMLDoc to use the current heading title from the HTML file as the left footer value. <xt:note>FOOTER RIGHT "$PAGE"</xt:note> This specifies text to be placed into the right side of the footer. Note the $PAGE variable, which tells HTMLDoc to use the page number as the right footer value. <xt:note>NEW PAGE</xt:note> This tells HTMLDoc to insert a page break before the rest of the content. Note that since ordinary HTML comment tags are stripped from XT templates, we use the <xt:note> tag instead. For a complete list of directives and their usage, see the official HTMLDoc documentation here: http://www.easysw.com/htmldoc/documentation.php 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. |