$mypdf = new PDFTemplate("pdf.xml",$debug);
$mypdf->Assign("NAME","Jon Doe");
$mypdf->Assign("USERNAME","jdoe");
$mypdf->Assign("PASSWORD","54321");
$mypdf->Parse();
$mypdf->Close();
The parameters are the name of the file and an optional debug flag. setting debug to 1 will result in a text out of the PDF renderer parsing. Use this to debug erroneous XML files.
The Parse command parses the entire file and renders each page to the client while substituting the variables.
the close command closes the PDF document and finishes sending the document to the client.
Helvetica
Courier
Times-Roman
Begins with a standard XML tag line.
<?xml version="1.0" encoding="ISO-8859-1"?>
Then the opening PDF tag.
<pdf xmlns:pdf="pdf.dtd">
The file must end with a </PDF>
Specifies a page break. All tags contained within the page tag will appear on the same page. (as long as it all fits)
Attributes:
MARGIN: Margin size in inches. Default 0.5 inches
WIDTH: Page width in inches. Default 8.5 inches.
HEIGHT: Page height in inches. Default 11 inches.
A paragraph marking. Text will be word wrapped and a line feed after the last line of text. All text must be in a paragraph.
Attributes:
INDENT: set to 1 to indent the first line of the paragraph by 1 half inch.
TAB: indent the entire paragraph by x inches.
ALIGN: alignment. Left,center,right,justified.
NOBREAK: set to 1 to prevent the trailing line feed.
Changes the font to bold
Changes the font to italics
Changes the current font.
Attributes:
FONT: the font to change to.
SIZE: the point size.
Set the TAB attribute to the next point where text is printed to this offset from left edge of page (ignoring margin.)
This tag does not have a closing TAG. use it like <TAB tab="4"/>
Forces a hard break with no linefeed.
This tag does not have a closing TAG. use it like <BR/>