DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Customizing the pdf-Page via TyposcriptΒΆ

The pdf is rendered based on a very simple template. You can easily update the pdf_creator page object to contain additional information or content elements on every pdf page.Some parameters can be set via the Constant Editor (see next chapter).

:underline:`You don't have to put any of the following lines into your template, they are already there. They are noted here just for reference purposes.`

pdf_creator2 = PAGE
pdf_creator2 {
  50 = CONTENT
  50 < styles.content.get
  typeNum = {$extension.pdf_creator2.typeNum}
  config.pageGenScript = EXT:pdf_creator2/gen_pdf.php
  config.admPanel = 0
  config.xhtml_cleaning = 0
  config.USERNAME_substToken =
  config.ftu = 0
  config.disableCharsetHeader = 1
  config.prefixLocalAnchors = 0
}

Example to modify pdf content from template setup:

temp.title = COA
temp.title {
 10 = TEXT
 10 {
   data = field:title
   if.isFalse.field = nav_hide
   wrap = <h1>|</h1>
 }
 20 = TEXT
 20 {
   value = &nbsp;
   if.isTrue.field = nav_hide
   wrap = <h1>|</h1>
 }
}

pdf_creator2 {
    # include current page CSS
    includeCSS < page.includeCSS
    # include custom CSS
    includeCSS.pdf = EXT:pdf_creator2/res/html2pdf.css
    10 = TEMPLATE
    10.template = FILE
    10.template.file = EXT:pdf_creator2/res/html2pdf.html
    10.marks.TITLE < temp.title
    50.stdWrap.wrap = <div id="maincol"> | </div>
}