PDFParser XML tags
<text>
The <text> tag is a block tag (requires a closing tag). All output that is not a PDFParser tag must be enclosed in this tag. These are the parameters to the text tag:
size (required) - font size
any legal parameter to Cezpdf::ezText() (all optional):
left - indentation from the left margin
right - indentation from the right margin
aleft - absolute indentation from the left side of the page
aright - absolute indentation from the right side of the page
justification - one of left, right, center/centre, full
either leading or spacing
Examples might include:
<text size="11">Hello World!</text>
<text size="11" justification="right">Hello World!</text>
<text size="11" left="10" right="10" justification="center">Hello World!</text>
<font>
Unlike HTML, the <font /> tag is a self-enclosed tag, and is only used to select the font face (and future versions will also select color). Syntax is <font face="fontface" /> The fontface must be present in the Converters/PDF/default/templates/fonts/ subdirectory as a fontface-php.afm and fontface.afm file, otherwise Cezpdf will cause all kinds of PHP warnings. This is an issue with Cezpdf that we are assisting the author in fixing, and will not be a problem in the future.
<newpage>
This is the simplest tag, use it as <newpage /> to tell Cezpdf to jump to the top of the next page in output.
<pdffunction>
The <pdffunction> tag is the most versatile of the PDFParser tags. This tag can be used to arbitrarily call any Cpdf or Cezpdf method. Arguments can be passed to the function both as literal values and using dynamic variables, both class variables and temporary variables. The method chosen is selected as if pdffunction were a namespace rather than a
Here are the parameters to the pdffunction:
return (optional) set a temporary variable to the value returned from the function. This parameter allows a later reference to the temporary variable like: <pdffunction:getYPlusOffset return="newy" offset="0" /> <pdffunction:addJpegFromFile arg="logo.jpg" x="250" y=$newy />
any other parameter represents an argument. Since the parameters passed are simply passed by value to the method, the names can be anything that is useful to understanding how they work. <pdffunction:ezStartPageNumbers x="500" y="28" size="10" pos="" pattern="{ldelim}PAGENUM{rdelim} of {ldelim}TOTALPAGENUM{rdelim}" num="1" /> could just as easily be <pdffunction:ezStartPageNumbers arg="500" foo="28" bar="10" mylord="" goodnessgracious="{ldelim}PAGENUM{rdelim} of {ldelim}TOTALPAGENUM{rdelim}" num="1" /> and the code would still work splendidly. The first way is obviously easier to handle, and so is recommended.
Most arguments to the method will be literals, like numbers or strings, but some arguments may need to be more dynamic, based on the values returned from other pdffunction tags. To do this, use the return parameter as described above, and reference the temporary variable as if it were a php variable like <pdffunction:whatever arg=$tempvar /> It may even be necessary to access a data member of the pdf class. In this case, use $this->datamember as in <pdffunction:whatever arg=$this->datamember />