PDFGenerator Class Reference

List of all members.

Public Member Functions

 processChapters ($dompdf, $name, $report)
 attachPDF ($pdf)
 stream ($pdfStr)

Static Public Member Functions

static cmToPixels ($cm, $dpi=72)
static replaceSpecial ($str)
static generate ($name, $html, $head, $person=null, $project=null, $preview=false, $report=null, $stream=false, $orientation='portrait')
static addChapter ($title, $pageOffset=0)
static addSubChapter ($title, $pageOffset=0)
static addSubSubChapter ($title, $pageOffset=0)
static addFootNote ($note)
static changeSection ()

Static Public Attributes

static $preview = false

Member Function Documentation

static PDFGenerator::addChapter ( title,
pageOffset = 0 
) [static]

Adds a top level bookmark to the document

Parameters:
string $title The title of the bookmark
integer $pageOffset The offset of the page index (useful for pdf attachments)
static PDFGenerator::addFootNote ( note  )  [static]

Adds a footnote to the PDF

Parameters:
string $note The text for the footnote
static PDFGenerator::addSubChapter ( title,
pageOffset = 0 
) [static]

Adds a second level Chapter bookmark to the document

Parameters:
string $title The title of the sub-bookmark
integer $pageOffset The offset of the page index (useful for pdf attachments)
static PDFGenerator::addSubSubChapter ( title,
pageOffset = 0 
) [static]

Adds a third level Chapter bookmark to the document

Parameters:
string $title The title of the sub-bookmark
integer $pageOffset The offset of the page index (useful for pdf attachments)
static PDFGenerator::generate ( name,
html,
head,
person = null,
project = null,
preview = false,
report = null,
stream = false,
orientation = 'portrait' 
) [static]

Generates a PDF based on html input

Parameters:
string $name The name of the PDF File
string $html The html input string
string $head Any extra html header information to include
Person $person The Person that this Report is being generated by
Project $project The Project that this Report belongs for (generally only for Project Reports)
boolean $preview Whether or not this should be a preview
AbstractReport $report The report that this PDF is for (optionally used to add extra information)
Returns:
array Returns an array containing the final html, as well as the pdf string
PDFGenerator::processChapters ( dompdf,
name,
report 
)

Concatenates the chapters to the pdf document using GhostScript

Parameters:
DOMPDF $dompdf The instantiated DOMPDF object
string $name The name of the PDF document
Returns:
string Returns the pdf string
PDFGenerator::stream ( pdfStr  ) 

Streams the pdf to the browser

Parameters:
string $pdfStr The pdf string

The documentation for this class was generated from the following file:

Generated on 9 Jan 2025 for The Forum by  doxygen 1.6.1