
Public Member Functions | |
| Cpdf ($pageSize=array(0, 0, 612, 792)) | |
| o_destination ($id, $action, $options= '') | |
| o_viewerPreferences ($id, $action, $options= '') | |
| o_catalog ($id, $action, $options= '') | |
| o_pages ($id, $action, $options= '') | |
| o_outlines ($id, $action, $options= '') | |
| o_font ($id, $action, $options= '') | |
| o_fontDescriptor ($id, $action, $options= '') | |
| o_fontEncoding ($id, $action, $options= '') | |
| o_procset ($id, $action, $options= '') | |
| o_info ($id, $action, $options= '') | |
| o_action ($id, $action, $options= '') | |
| o_annotation ($id, $action, $options= '') | |
| o_page ($id, $action, $options= '') | |
| o_contents ($id, $action, $options= '') | |
| o_image ($id, $action, $options= '') | |
| o_encryption ($id, $action, $options= '') | |
| md5_16 ($string) | |
| encryptInit ($id) | |
| ARC4_init ($key= '') | |
| ARC4 ($text) | |
| addLink ($url, $x0, $y0, $x1, $y1) | |
| addInternalLink ($label, $x0, $y0, $x1, $y1) | |
| setEncryption ($userPass= '', $ownerPass= '', $pc=array()) | |
| checkAllHere () | |
| output ($debug=0) | |
| newDocument ($pageSize=array(0, 0, 612, 792)) | |
| openFont ($font) | |
| selectFont ($fontName, $encoding= '', $set=1) | |
| setCurrentFont () | |
| getFirstPageId () | |
| addContent ($content) | |
| setColor ($r, $g, $b, $force=0) | |
| setStrokeColor ($r, $g, $b, $force=0) | |
| line ($x1, $y1, $x2, $y2) | |
| curve ($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3) | |
| partEllipse ($x0, $y0, $astart, $afinish, $r1, $r2=0, $angle=0, $nSeg=8) | |
| filledEllipse ($x0, $y0, $r1, $r2=0, $angle=0, $nSeg=8, $astart=0, $afinish=360) | |
| ellipse ($x0, $y0, $r1, $r2=0, $angle=0, $nSeg=8, $astart=0, $afinish=360, $close=1, $fill=0) | |
| setLineStyle ($width=1, $cap= '', $join= '', $dash= '', $phase=0) | |
| polygon ($p, $np, $f=0) | |
| filledRectangle ($x1, $y1, $width, $height) | |
| rectangle ($x1, $y1, $width, $height) | |
| newPage ($insert=0, $id=0, $pos= 'after') | |
| stream ($options= '') | |
| getFontHeight ($size) | |
| getFontDecender ($size) | |
| filterText ($text) | |
| PRVTgetTextPosition ($x, $y, $angle, $size, $wa, $text) | |
| PRVTcheckTextDirective (&$text, $i, &$f) | |
| PRVTcheckTextDirective1 (&$text, $i, &$f, $final, &$x, &$y, $size=0, $angle=0, $wordSpaceAdjust=0) | |
| addText ($x, $y, $size, $text, $angle=0, $wordSpaceAdjust=0) | |
| getTextWidth ($size, $text) | |
| PRVTadjustWrapText ($text, $actual, $width, &$x, &$adjust, $justification) | |
| addTextWrap ($x, $y, $width, $size, $text, $justification= 'left', $angle=0, $test=0) | |
| saveState ($pageEnd=0) | |
| restoreState ($pageEnd=0) | |
| openObject () | |
| reopenObject ($id) | |
| closeObject () | |
| stopObject ($id) | |
| addObject ($id, $options= 'add') | |
| addInfo ($label, $value=0) | |
| setPreferences ($label, $value=0) | |
| PRVT_getBytes (&$data, $pos, $num) | |
| addPngFromFile ($file, $x, $y, $w=0, $h=0) | |
| addJpegFromFile ($img, $x, $y, $w=0, $h=0) | |
| addImage (&$img, $x, $y, $w=0, $h=0, $quality=75) | |
| addJpegImage_common (&$data, $x, $y, $w=0, $h=0, $imageWidth, $imageHeight, $channels=3) | |
| openHere ($style, $a=0, $b=0, $c=0) | |
| addDestination ($label, $style, $a=0, $b=0, $c=0) | |
| setFontFamily ($family, $options= '') | |
| addMessage ($message) | |
| transaction ($action) | |
| SetFontsPath ($path) | |
Public Attributes | |
| $numObj = 0 | |
| $objects | |
| $catalogId | |
| $fonts | |
| $currentFont = '' | |
| $currentBaseFont = '' | |
| $currentFontNum = 0 | |
| $currentNode | |
| $currentPage | |
| $currentContents | |
| $numFonts = 0 | |
| $currentColour = array('r' => -1, 'g' => -1, 'b' => -1) | |
| $currentStrokeColour = array('r' => -1, 'g' => -1, 'b' => -1) | |
| $currentLineStyle = '' | |
| $stateStack | |
| $nStateStack = 0 | |
| $numPages = 0 | |
| $stack | |
| $nStack = 0 | |
| $looseObjects | |
| $addLooseObjects | |
| $infoObject = 0 | |
| $numImages = 0 | |
| $options = array('compression' => 1) | |
| $firstPageId | |
| $wordSpaceAdjust = 0 | |
| $procsetObjectId | |
| $fontFamilies | |
| $currentTextState = '' | |
| $messages = '' | |
| $arc4 = '' | |
| $arc4_objnum = 0 | |
| $fileIdentifier = '' | |
| $encrypted = 0 | |
| $encryptionKey = '' | |
| $callback | |
| $nCallback = 0 | |
| $destinations | |
| $checkpoint = '' | |
| $fonts_path | |
Definition at line 29 of file class.pdf.php.
| Cpdf::Cpdf | ( | $ | pageSize = array(0, 0, 612, 792) |
) |
Definition at line 216 of file class.pdf.php.
References newDocument(), setFontFamily(), and SetFontsPath().
Referenced by Cezpdf::Cezpdf().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_destination | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
destination object, used to specify the location for the user to jump to, presently on opening
Definition at line 245 of file class.pdf.php.
References $options.
Referenced by addDestination(), and openHere().
Here is the caller graph for this function:

| Cpdf::o_viewerPreferences | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
set the viewer preferences
Definition at line 296 of file class.pdf.php.
References $options.
Referenced by o_catalog().
Here is the caller graph for this function:

| Cpdf::o_catalog | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
define the document catalog, the overall controller for the document
Definition at line 352 of file class.pdf.php.
References $options, o_viewerPreferences(), and openHere().
Referenced by newDocument(), o_outlines(), o_pages(), openHere(), and setPreferences().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_pages | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
object which is a parent to the pages in the document
Definition at line 429 of file class.pdf.php.
References $options, __sprintf(), and o_catalog().
Referenced by newDocument(), o_font(), o_image(), o_page(), and o_procset().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_outlines | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
define the outlines in the doc, empty for now
Definition at line 600 of file class.pdf.php.
References $options, and o_catalog().
Referenced by newDocument().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_font | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an object to hold the font description
Definition at line 650 of file class.pdf.php.
References $options, addMessage(), o_fontEncoding(), and o_pages().
Referenced by selectFont().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_fontDescriptor | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
a font descriptor, needed for including additional fonts
Definition at line 776 of file class.pdf.php.
References $options.
Referenced by selectFont().
Here is the caller graph for this function:

| Cpdf::o_fontEncoding | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
the font encoding
Definition at line 851 of file class.pdf.php.
References $options.
Referenced by o_font().
Here is the caller graph for this function:

| Cpdf::o_procset | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
the document procset, solves some problems with printing to old PS printers
Definition at line 910 of file class.pdf.php.
References $options, and o_pages().
Referenced by newDocument(), and o_image().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_info | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
define the document information
Definition at line 962 of file class.pdf.php.
References $options, ARC4(), encryptInit(), and filterText().
Referenced by addInfo(), and newDocument().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_action | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an action object, used to link to URLS initially
Definition at line 1030 of file class.pdf.php.
References $options, ARC4(), encryptInit(), and filterText().
Referenced by o_annotation().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_annotation | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an annotation object, this will add an annotation to the current page. initially will support just link annotations
Definition at line 1104 of file class.pdf.php.
References $options, __sprintf(), o_action(), and o_page().
Referenced by addInternalLink(), and addLink().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_page | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
a page object, it also creates a contents object to hold its contents
Definition at line 1184 of file class.pdf.php.
References $options, o_contents(), and o_pages().
Referenced by addObject(), newDocument(), newPage(), and o_annotation().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_contents | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
the contents objects hold all of the content which appears on pages
Definition at line 1295 of file class.pdf.php.
References $options, ARC4(), and encryptInit().
Referenced by o_image(), o_page(), openObject(), and selectFont().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_image | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an image object, will be an XObject in the document, includes description and data
Definition at line 1376 of file class.pdf.php.
References $options, ARC4(), encryptInit(), o_contents(), o_pages(), and o_procset().
Referenced by addJpegImage_common(), and addPngFromFile().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::o_encryption | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
encryption object.
Definition at line 1493 of file class.pdf.php.
References $options, ARC4(), ARC4_init(), filterText(), and md5_16().
Referenced by setEncryption().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::md5_16 | ( | $ | string | ) |
calculate the 16 byte version of the 128 bit md5 digest of the string
Definition at line 1596 of file class.pdf.php.
Referenced by encryptInit(), and o_encryption().
Here is the caller graph for this function:

| Cpdf::encryptInit | ( | $ | id | ) |
initialize the encryption for processing a particular object
Definition at line 1612 of file class.pdf.php.
References ARC4_init(), and md5_16().
Referenced by o_action(), o_contents(), o_image(), and o_info().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::ARC4_init | ( | $ | key = '' |
) |
initialize the ARC4 encryption
Definition at line 1632 of file class.pdf.php.
Referenced by encryptInit(), o_encryption(), and output().
Here is the caller graph for this function:

| Cpdf::ARC4 | ( | $ | text | ) |
ARC4 encrypt a text string
Definition at line 1670 of file class.pdf.php.
Referenced by o_action(), o_contents(), o_encryption(), o_image(), and o_info().
Here is the caller graph for this function:

| Cpdf::addLink | ( | $ | url, | |
| $ | x0, | |||
| $ | y0, | |||
| $ | x1, | |||
| $ | y1 | |||
| ) |
add a link in the document to an external URL
Definition at line 1699 of file class.pdf.php.
References o_annotation().
Referenced by Cezpdf::alink().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addInternalLink | ( | $ | label, | |
| $ | x0, | |||
| $ | y0, | |||
| $ | x1, | |||
| $ | y1 | |||
| ) |
add a link in the document to an internal destination (ie. within the document)
Definition at line 1715 of file class.pdf.php.
References o_annotation().
Referenced by Cezpdf::alink().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::setEncryption | ( | $ | userPass = '', |
|
| $ | ownerPass = '', |
|||
| $ | pc = array( ) | |||
| ) |
set the encryption of the document can be used to turn it on and/or set the passwords which it will have. also the functions that the user will have are set here, such as print, modify, add
Definition at line 1733 of file class.pdf.php.
References $options, and o_encryption().
Here is the call graph for this function:

| Cpdf::checkAllHere | ( | ) |
should be used for internal checks, not implemented as yet
Definition at line 1776 of file class.pdf.php.
Referenced by output().
Here is the caller graph for this function:

| Cpdf::output | ( | $ | debug = 0 |
) |
return the pdf stream as a string returned from the function
Definition at line 1783 of file class.pdf.php.
References ARC4_init(), and checkAllHere().
Referenced by Cezpdf::ezOutput(), and stream().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::newDocument | ( | $ | pageSize = array(0, 0, 612, 792) |
) |
intialize a new document if this is called on an existing document results may be unpredictable, but the existing document would be lost at minimum this function is called automatically by the constructor function
private
Definition at line 1847 of file class.pdf.php.
References o_catalog(), o_info(), o_outlines(), o_page(), o_pages(), and o_procset().
Referenced by Cpdf().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::openFont | ( | $ | font | ) |
open the font file and return a php structure containing it. first check if this one has been done before and saved in a form more suited to php note that if a php serialized version does not exist it will try and make one, but will require write access to the directory to do it... it is MUCH faster to have these serialized files.
private
Definition at line 1888 of file class.pdf.php.
References addMessage().
Referenced by selectFont().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::selectFont | ( | $ | fontName, | |
| $ | encoding = '', |
|||
| $ | set = 1 | |||
| ) |
if the font is not loaded then load it and make the required object else just make it the current font the encoding array can contain 'encoding'=> 'none','WinAnsiEncoding','MacRomanEncoding' or 'MacExpertEncoding' note that encoding='none' will need to be used for symbolic fonts and 'differences' => an array of mappings between numbers 0->255 and character names.
Definition at line 2046 of file class.pdf.php.
References $options, addMessage(), o_contents(), o_font(), o_fontDescriptor(), openFont(), and setCurrentFont().
Referenced by addText(), addTextWrap(), getFontDecender(), getFontHeight(), getTextWidth(), and setCurrentFont().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::setCurrentFont | ( | ) |
sets up the current font, based on the font families, and the current text state note that this system is quite flexible, a font can be completely different to a font, and even will have to be defined within the family to have meaning This function is to be called whenever the currentTextState is changed, it will update the currentFont setting to whatever the appropriatte family one is. If the user calls selectFont themselves then that will reset the currentBaseFont, and the currentFont This function will change the currentFont to whatever it should be, but will not change the currentBaseFont.
private
Definition at line 2335 of file class.pdf.php.
References selectFont().
Referenced by addText(), addTextWrap(), getTextWidth(), and selectFont().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::getFirstPageId | ( | ) |
function for the user to find out what the ID is of the first page that was created during startup - useful if they wish to add something to it later.
Definition at line 2370 of file class.pdf.php.
Referenced by Cezpdf::Cezpdf().
Here is the caller graph for this function:

| Cpdf::addContent | ( | $ | content | ) |
| Cpdf::setColor | ( | $ | r, | |
| $ | g, | |||
| $ | b, | |||
| $ | force = 0 | |||
| ) |
sets the colour for fill operations
Definition at line 2388 of file class.pdf.php.
References __sprintf().
Referenced by Cezpdf::alink(), Cezpdf::ezTable(), newPage(), and saveState().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::setStrokeColor | ( | $ | r, | |
| $ | g, | |||
| $ | b, | |||
| $ | force = 0 | |||
| ) |
sets the colour for stroke operations
Definition at line 2409 of file class.pdf.php.
References __sprintf().
Referenced by Cezpdf::alink(), Cezpdf::ezImage(), Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), newPage(), and saveState().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::line | ( | $ | x1, | |
| $ | y1, | |||
| $ | x2, | |||
| $ | y2 | |||
| ) |
draw a line from one set of coordinates to another
Definition at line 2430 of file class.pdf.php.
References __sprintf().
Referenced by Cezpdf::alink(), Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), MCezpdf::HorizontalLine(), and Cezpdf::uline().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::curve | ( | $ | x0, | |
| $ | y0, | |||
| $ | x1, | |||
| $ | y1, | |||
| $ | x2, | |||
| $ | y2, | |||
| $ | x3, | |||
| $ | y3 | |||
| ) |
draw a bezier curve based on 4 control points
Definition at line 2442 of file class.pdf.php.
References __sprintf().
Here is the call graph for this function:

| Cpdf::partEllipse | ( | $ | x0, | |
| $ | y0, | |||
| $ | astart, | |||
| $ | afinish, | |||
| $ | r1, | |||
| $ | r2 = 0, |
|||
| $ | angle = 0, |
|||
| $ | nSeg = 8 | |||
| ) |
draw a part of an ellipse
Definition at line 2460 of file class.pdf.php.
References ellipse().
Here is the call graph for this function:

| Cpdf::filledEllipse | ( | $ | x0, | |
| $ | y0, | |||
| $ | r1, | |||
| $ | r2 = 0, |
|||
| $ | angle = 0, |
|||
| $ | nSeg = 8, |
|||
| $ | astart = 0, |
|||
| $ | afinish = 360 | |||
| ) |
draw a filled ellipse
Definition at line 2468 of file class.pdf.php.
References ellipse().
Here is the call graph for this function:

| Cpdf::ellipse | ( | $ | x0, | |
| $ | y0, | |||
| $ | r1, | |||
| $ | r2 = 0, |
|||
| $ | angle = 0, |
|||
| $ | nSeg = 8, |
|||
| $ | astart = 0, |
|||
| $ | afinish = 360, |
|||
| $ | close = 1, |
|||
| $ | fill = 0 | |||
| ) |
draw an ellipse note that the part and filled ellipse are just special cases of this function
draws an ellipse in the current line style centered at $x0,$y0, radii $r1,$r2 if $r2 is not set, then a circle is drawn nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a pretty crappy shape at 2, as we are approximating with bezier curves.
Definition at line 2483 of file class.pdf.php.
References __sprintf().
Referenced by filledEllipse(), and partEllipse().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::setLineStyle | ( | $ | width = 1, |
|
| $ | cap = '', |
|||
| $ | join = '', |
|||
| $ | dash = '', |
|||
| $ | phase = 0 | |||
| ) |
this sets the line drawing style. width, is the thickness of the line in user units cap is the type of cap to put on the line, values can be 'butt','round','square' where the diffference between 'square' and 'butt' is that 'square' projects a flat end past the end of the line. join can be 'miter', 'round', 'bevel' dash is an array which sets the dash pattern, is a series of length values, which are the lengths of the on and off dashes. (2) represents 2 on, 2 off, 2 on , 2 off ... (2,1) is 2 on, 1 off, 2 on, 1 off.. etc phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts.
Definition at line 2593 of file class.pdf.php.
Referenced by Cezpdf::alink(), Cezpdf::ezImage(), Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), and Cezpdf::uline().
Here is the caller graph for this function:

| Cpdf::polygon | ( | $ | p, | |
| $ | np, | |||
| $ | f = 0 | |||
| ) |
draw a polygon, the syntax for this is similar to the GD polygon command
Definition at line 2647 of file class.pdf.php.
References __sprintf().
Here is the call graph for this function:

| Cpdf::filledRectangle | ( | $ | x1, | |
| $ | y1, | |||
| $ | width, | |||
| $ | height | |||
| ) |
a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not the coordinates of the upper-right corner
Definition at line 2674 of file class.pdf.php.
References __sprintf().
Referenced by Cezpdf::ezTable().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::rectangle | ( | $ | x1, | |
| $ | y1, | |||
| $ | width, | |||
| $ | height | |||
| ) |
draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not the coordinates of the upper-right corner
Definition at line 2688 of file class.pdf.php.
References __sprintf().
Referenced by Cezpdf::ezImage().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::newPage | ( | $ | insert = 0, |
|
| $ | id = 0, |
|||
| $ | pos = 'after' | |||
| ) |
add a new page to the document this also makes the new page the current active object
Definition at line 2702 of file class.pdf.php.
References o_page(), restoreState(), saveState(), setColor(), and setStrokeColor().
Referenced by Cezpdf::ezNewPage().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::stream | ( | $ | options = '' |
) |
output the pdf code, streaming it to the browser the relevant headers are set so that hopefully the browser will recognise it
Definition at line 2771 of file class.pdf.php.
References $options, and output().
Referenced by Cezpdf::ezStream().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::getFontHeight | ( | $ | size | ) |
return the height in units of the current font in the given size
Definition at line 2812 of file class.pdf.php.
References selectFont().
Referenced by Cezpdf::ezImage(), Cezpdf::ezTable(), Cezpdf::ezText(), and PRVTcheckTextDirective1().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::getFontDecender | ( | $ | size | ) |
return the font decender, this will normally return a negative number if you add this number to the baseline, you get the level of the bottom of the font it is in the pdf user units
Definition at line 2829 of file class.pdf.php.
References selectFont().
Referenced by Cezpdf::ezTable(), and PRVTcheckTextDirective1().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::filterText | ( | $ | text | ) |
filter the text, this is applied to all text just before being inserted into the pdf document it escapes the various things that need to be escaped, and so on
private
Definition at line 2847 of file class.pdf.php.
Referenced by addText(), o_action(), o_encryption(), and o_info().
Here is the caller graph for this function:

| Cpdf::PRVTgetTextPosition | ( | $ | x, | |
| $ | y, | |||
| $ | angle, | |||
| $ | size, | |||
| $ | wa, | |||
| $ | text | |||
| ) |
given a start position and information about how text is to be laid out, calculate where on the page the text will end
private
Definition at line 2867 of file class.pdf.php.
References getTextWidth().
Referenced by addText(), and PRVTcheckTextDirective1().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::PRVTcheckTextDirective | ( | &$ | text, | |
| $ | i, | |||
| &$ | f | |||
| ) |
wrapper function for PRVTcheckTextDirective1
private
Definition at line 2884 of file class.pdf.php.
References PRVTcheckTextDirective1().
Referenced by addText(), addTextWrap(), and getTextWidth().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::PRVTcheckTextDirective1 | ( | &$ | text, | |
| $ | i, | |||
| &$ | f, | |||
| $ | final, | |||
| &$ | x, | |||
| &$ | y, | |||
| $ | size = 0, |
|||
| $ | angle = 0, |
|||
| $ | wordSpaceAdjust = 0 | |||
| ) |
checks if the text stream contains a control directive if so then makes some changes and returns the number of characters involved in the directive this has been re-worked to include everything neccesary to fins the current writing point, so that the location can be sent to the callback function if required if the directive does not require a font change, then $f should be set to 0
private
Definition at line 2900 of file class.pdf.php.
References $wordSpaceAdjust, getFontDecender(), getFontHeight(), and PRVTgetTextPosition().
Referenced by addText(), and PRVTcheckTextDirective().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addText | ( | $ | x, | |
| $ | y, | |||
| $ | size, | |||
| $ | text, | |||
| $ | angle = 0, |
|||
| $ | wordSpaceAdjust = 0 | |||
| ) |
add text to the document, at a specified location, size and angle on the page
Definition at line 3136 of file class.pdf.php.
References $wordSpaceAdjust, __sprintf(), filterText(), PRVTcheckTextDirective(), PRVTcheckTextDirective1(), PRVTgetTextPosition(), selectFont(), and setCurrentFont().
Referenced by addTextWrap(), Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::getTextWidth | ( | $ | size, | |
| $ | text | |||
| ) |
calculate how wide a given text string will be on a page, at a given size. this can be called externally, but is alse used by the other class functions
Definition at line 3298 of file class.pdf.php.
References PRVTcheckTextDirective(), selectFont(), and setCurrentFont().
Referenced by Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezPrvtGetTextWidth(), Cezpdf::ezTable(), and PRVTgetTextPosition().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::PRVTadjustWrapText | ( | $ | text, | |
| $ | actual, | |||
| $ | width, | |||
| &$ | x, | |||
| &$ | adjust, | |||
| $ | justification | |||
| ) |
do a part of the calculation for sorting out the justification of the text
private
Definition at line 3366 of file class.pdf.php.
Referenced by addTextWrap().
Here is the caller graph for this function:

| Cpdf::addTextWrap | ( | $ | x, | |
| $ | y, | |||
| $ | width, | |||
| $ | size, | |||
| $ | text, | |||
| $ | justification = 'left', |
|||
| $ | angle = 0, |
|||
| $ | test = 0 | |||
| ) |
add text to the page, but ensure that it fits within a certain width if it does not fit then put in as much as possible, splitting at word boundaries and return the remainder. justification and angle can also be specified for the text
Definition at line 3411 of file class.pdf.php.
References addText(), PRVTadjustWrapText(), PRVTcheckTextDirective(), selectFont(), and setCurrentFont().
Referenced by Cezpdf::ezTable(), and Cezpdf::ezText().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::saveState | ( | $ | pageEnd = 0 |
) |
this will be called at a new page to return the state to what it was on the end of the previous page, before the stack was closed down This is to get around not being able to have open 'q' across pages
Definition at line 3579 of file class.pdf.php.
References setColor(), and setStrokeColor().
Referenced by Cezpdf::alink(), Cezpdf::ezTable(), newPage(), and Cezpdf::uline().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::restoreState | ( | $ | pageEnd = 0 |
) |
restore a previously saved state
Definition at line 3609 of file class.pdf.php.
Referenced by Cezpdf::alink(), Cezpdf::ezTable(), newPage(), and Cezpdf::uline().
Here is the caller graph for this function:

| Cpdf::openObject | ( | ) |
make a loose object, the output will go into this object, until it is closed, then will revert to the current one. this object will not appear until it is included within a page. the function will return the object number
Definition at line 3631 of file class.pdf.php.
References o_contents().
Referenced by Cezpdf::ezTable().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::reopenObject | ( | $ | id | ) |
open an existing object for editing
Definition at line 3652 of file class.pdf.php.
Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable().
Here is the caller graph for this function:

| Cpdf::closeObject | ( | ) |
close an object
Definition at line 3673 of file class.pdf.php.
Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable().
Here is the caller graph for this function:

| Cpdf::stopObject | ( | $ | id | ) |
stop an object from appearing on pages from this point on
Definition at line 3690 of file class.pdf.php.
| Cpdf::addObject | ( | $ | id, | |
| $ | options = 'add' | |||
| ) |
after an object has been created, it wil only show if it has been added, using this function.
Definition at line 3703 of file class.pdf.php.
References $options, and o_page().
Referenced by Cezpdf::ezTable().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addInfo | ( | $ | label, | |
| $ | value = 0 | |||
| ) |
add content to the documents info object
Definition at line 3771 of file class.pdf.php.
References o_info().
Here is the call graph for this function:

| Cpdf::setPreferences | ( | $ | label, | |
| $ | value = 0 | |||
| ) |
set the viewer preferences of the document, it is up to the browser to obey these.
Definition at line 3793 of file class.pdf.php.
References o_catalog().
Here is the call graph for this function:

| Cpdf::PRVT_getBytes | ( | &$ | data, | |
| $ | pos, | |||
| $ | num | |||
| ) |
extract an integer from a position in a byte stream
private
Definition at line 3814 of file class.pdf.php.
Referenced by addPngFromFile().
Here is the caller graph for this function:

| Cpdf::addPngFromFile | ( | $ | file, | |
| $ | x, | |||
| $ | y, | |||
| $ | w = 0, |
|||
| $ | h = 0 | |||
| ) |
add a PNG image into the document, from a file this should work with remote files
Definition at line 3832 of file class.pdf.php.
References $options, __sprintf(), addMessage(), o_image(), and PRVT_getBytes().
Referenced by Cezpdf::ezImage().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addJpegFromFile | ( | $ | img, | |
| $ | x, | |||
| $ | y, | |||
| $ | w = 0, |
|||
| $ | h = 0 | |||
| ) |
add a JPEG image into the document, from a file
Definition at line 4099 of file class.pdf.php.
References addJpegImage_common().
Referenced by Cezpdf::ezImage().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addImage | ( | &$ | img, | |
| $ | x, | |||
| $ | y, | |||
| $ | w = 0, |
|||
| $ | h = 0, |
|||
| $ | quality = 75 | |||
| ) |
add an image into the document, from a GD object this function is not all that reliable, and I would probably encourage people to use the file based functions
Definition at line 4154 of file class.pdf.php.
References addJpegImage_common().
Here is the call graph for this function:

| Cpdf::addJpegImage_common | ( | &$ | data, | |
| $ | x, | |||
| $ | y, | |||
| $ | w = 0, |
|||
| $ | h = 0, |
|||
| $ | imageWidth, | |||
| $ | imageHeight, | |||
| $ | channels = 3 | |||
| ) |
common code used by the two JPEG adding functions
private
Definition at line 4230 of file class.pdf.php.
References __sprintf(), and o_image().
Referenced by addImage(), and addJpegFromFile().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::openHere | ( | $ | style, | |
| $ | a = 0, |
|||
| $ | b = 0, |
|||
| $ | c = 0 | |||
| ) |
specify where the document should open when it first starts
Definition at line 4256 of file class.pdf.php.
References o_catalog(), and o_destination().
Referenced by o_catalog().
Here is the call graph for this function:

Here is the caller graph for this function:

| Cpdf::addDestination | ( | $ | label, | |
| $ | style, | |||
| $ | a = 0, |
|||
| $ | b = 0, |
|||
| $ | c = 0 | |||
| ) |
create a labelled destination within the document
Definition at line 4278 of file class.pdf.php.
References o_destination().
Here is the call graph for this function:

| Cpdf::setFontFamily | ( | $ | family, | |
| $ | options = '' | |||
| ) |
define font families, this is used to initialize the font families for the default fonts and for the user to add new ones for their fonts. The default bahavious can be overridden should that be desired.
Definition at line 4296 of file class.pdf.php.
References $options.
Referenced by Cpdf().
Here is the caller graph for this function:

| Cpdf::addMessage | ( | $ | message | ) |
used to add messages for use in debugging
Definition at line 4344 of file class.pdf.php.
Referenced by addPngFromFile(), Cezpdf::ezWhatPageNumber(), o_font(), openFont(), and selectFont().
Here is the caller graph for this function:

| Cpdf::transaction | ( | $ | action | ) |
a few functions which should allow the document to be treated transactionally.
Definition at line 4399 of file class.pdf.php.
Referenced by Cezpdf::ezPrvtTableColumnHeadings(), and Cezpdf::ezTable().
Here is the caller graph for this function:

| Cpdf::SetFontsPath | ( | $ | path | ) |
Definition at line 4462 of file class.pdf.php.
Referenced by Cpdf().
Here is the caller graph for this function:

| Cpdf::$numObj = 0 |
the current number of pdf objects in the document
Definition at line 35 of file class.pdf.php.
| Cpdf::$objects |
Initial value:
array(
)
Definition at line 39 of file class.pdf.php.
| Cpdf::$catalogId |
the objectId (number within the objects array) of the document catalog
Definition at line 44 of file class.pdf.php.
| Cpdf::$fonts |
Initial value:
array(
)
Definition at line 49 of file class.pdf.php.
| Cpdf::$currentFont = '' |
a record of the current font
Definition at line 54 of file class.pdf.php.
| Cpdf::$currentBaseFont = '' |
the current base font
Definition at line 58 of file class.pdf.php.
| Cpdf::$currentFontNum = 0 |
the number of the current font within the font array
Definition at line 62 of file class.pdf.php.
| Cpdf::$currentNode |
Definition at line 66 of file class.pdf.php.
| Cpdf::$currentPage |
object number of the current page
Definition at line 70 of file class.pdf.php.
| Cpdf::$currentContents |
object number of the currently active contents block
Definition at line 74 of file class.pdf.php.
| Cpdf::$numFonts = 0 |
number of fonts within the system
Definition at line 78 of file class.pdf.php.
| Cpdf::$currentColour = array('r' => -1, 'g' => -1, 'b' => -1) |
current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active
Definition at line 82 of file class.pdf.php.
| Cpdf::$currentStrokeColour = array('r' => -1, 'g' => -1, 'b' => -1) |
current colour for stroke operations (lines etc.)
Definition at line 86 of file class.pdf.php.
| Cpdf::$currentLineStyle = '' |
current style that lines are drawn in
Definition at line 90 of file class.pdf.php.
| Cpdf::$stateStack |
Initial value:
array(
)
Definition at line 95 of file class.pdf.php.
| Cpdf::$nStateStack = 0 |
number of elements within the state stack
Definition at line 100 of file class.pdf.php.
| Cpdf::$numPages = 0 |
number of page objects within the document
Definition at line 104 of file class.pdf.php.
| Cpdf::$stack |
| Cpdf::$nStack = 0 |
number of elements within the object Id storage stack
Definition at line 113 of file class.pdf.php.
| Cpdf::$looseObjects |
Initial value:
array(
)
Definition at line 118 of file class.pdf.php.
| Cpdf::$addLooseObjects |
Initial value:
array(
)
Definition at line 123 of file class.pdf.php.
| Cpdf::$infoObject = 0 |
the objectId of the information object for the document this contains authorship, title etc.
Definition at line 129 of file class.pdf.php.
| Cpdf::$numImages = 0 |
number of images being tracked within the document
Definition at line 133 of file class.pdf.php.
| Cpdf::$options = array('compression' => 1) |
an array containing options about the document it defaults to turning on the compression of the objects
Definition at line 138 of file class.pdf.php.
Referenced by addObject(), addPngFromFile(), Cezpdf::ezColumnsStart(), Cezpdf::ezOutput(), Cezpdf::ezPrvtTableColumnHeadings(), Cezpdf::ezStream(), Cezpdf::ezTable(), Cezpdf::ezText(), o_action(), o_annotation(), o_catalog(), o_contents(), o_destination(), o_encryption(), o_font(), o_fontDescriptor(), o_fontEncoding(), o_image(), o_info(), o_outlines(), o_page(), o_pages(), o_procset(), o_viewerPreferences(), selectFont(), setEncryption(), setFontFamily(), and stream().
| Cpdf::$firstPageId |
the objectId of the first page of the document
Definition at line 142 of file class.pdf.php.
| Cpdf::$wordSpaceAdjust = 0 |
used to track the last used value of the inter-word spacing, this is so that it is known when the spacing is changed.
Definition at line 147 of file class.pdf.php.
Referenced by addText(), and PRVTcheckTextDirective1().
| Cpdf::$procsetObjectId |
the object Id of the procset object
Definition at line 151 of file class.pdf.php.
| Cpdf::$fontFamilies |
Initial value:
array(
)
Definition at line 157 of file class.pdf.php.
| Cpdf::$currentTextState = '' |
track if the current font is bolded or italicised
Definition at line 162 of file class.pdf.php.
| Cpdf::$messages = '' |
messages are stored here during processing, these can be selected afterwards to give some useful debug information
Definition at line 166 of file class.pdf.php.
| Cpdf::$arc4 = '' |
the ancryption array for the document encryption is stored here
Definition at line 170 of file class.pdf.php.
| Cpdf::$arc4_objnum = 0 |
the object Id of the encryption information
Definition at line 174 of file class.pdf.php.
| Cpdf::$fileIdentifier = '' |
the file identifier, used to uniquely identify a pdf document
Definition at line 178 of file class.pdf.php.
| Cpdf::$encrypted = 0 |
a flag to say if a document is to be encrypted or not
Definition at line 182 of file class.pdf.php.
| Cpdf::$encryptionKey = '' |
the ancryption key for the encryption of all the document content (structure is not encrypted)
Definition at line 186 of file class.pdf.php.
| Cpdf::$callback |
Initial value:
array(
)
Definition at line 190 of file class.pdf.php.
| Cpdf::$nCallback = 0 |
the number of callback functions in the callback array
Definition at line 195 of file class.pdf.php.
| Cpdf::$destinations |
Initial value:
array(
)
Definition at line 200 of file class.pdf.php.
| Cpdf::$checkpoint = '' |
store the stack for the transaction commands, each item in here is a record of the values of all the variables within the class, so that the user can rollback at will (from each 'start' command) note that this includes the objects array, so these can be large.
Definition at line 207 of file class.pdf.php.
| Cpdf::$fonts_path |
Definition at line 214 of file class.pdf.php.