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

| Cpdf::addMessage | ( | $ | message | ) |
used to add messages for use in debugging
Definition at line 3029 of file class.pdf.php.
Referenced by Cezpdf::ezWhatPageNumber(), o_font(), openFont(), and selectFont().
| 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 2550 of file class.pdf.php.
Referenced by Cezpdf::ezTable().
| 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 2643 of file class.pdf.php.
Referenced by Cezpdf::ezImage().
| 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 2162 of file class.pdf.php.
Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable().
| 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 2337 of file class.pdf.php.
Referenced by Cezpdf::ezTable(), and Cezpdf::ezText().
| Cpdf::ARC4 | ( | $ | text | ) |
ARC4 encrypt a text string
Definition at line 1143 of file class.pdf.php.
References $b, $c, $i, $out, and $text.
Referenced by o_action(), o_contents(), o_encryption(), o_image(), and o_info().
| Cpdf::ARC4_init | ( | $ | key = '' |
) |
initialize the ARC4 encryption
Definition at line 1117 of file class.pdf.php.
References $i.
Referenced by encryptInit(), o_encryption(), and output().
| Cpdf::checkAllHere | ( | ) |
should be used for internal checks, not implemented as yet
Definition at line 1219 of file class.pdf.php.
Referenced by output().
| Cpdf::closeObject | ( | ) |
close an object
Definition at line 2524 of file class.pdf.php.
Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable().
| Cpdf::Cpdf | ( | $ | pageSize = array(0,0,612,792) |
) |
Definition at line 202 of file class.pdf.php.
References newDocument(), and setFontFamily().
Referenced by Cezpdf::Cezpdf().
Here is the call 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 1688 of file class.pdf.php.
| 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 1719 of file class.pdf.php.
References $close, $i, and $tmp.
Referenced by filledEllipse(), and partEllipse().
| Cpdf::encryptInit | ( | $ | id | ) |
initialize the encryption for processing a particular object
Definition at line 1103 of file class.pdf.php.
References $tmp, ARC4_init(), and md5_16().
Referenced by o_action(), o_contents(), o_image(), and o_info().
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 1705 of file class.pdf.php.
References ellipse().
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 1841 of file class.pdf.php.
References $height, and $width.
Referenced by Cezpdf::ezTable(), and BitPdf::titlebar().
| 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 1964 of file class.pdf.php.
References $text.
Referenced by o_action(), and o_info().
| 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 1645 of file class.pdf.php.
Referenced by Cezpdf::Cezpdf().
| 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 1949 of file class.pdf.php.
References $h, and selectFont().
Referenced by Cezpdf::ezTable(), and BitPdf::titlebar().
Here is the call graph for this function:

| Cpdf::getFontHeight | ( | $ | size | ) |
return the height in units of the current font in the given size
Definition at line 1935 of file class.pdf.php.
References $h, and selectFont().
Referenced by Cezpdf::ezImage(), Cezpdf::ezTable(), Cezpdf::ezText(), and BitPdf::titlebar().
Here is the call 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 2254 of file class.pdf.php.
Referenced by Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezPrvtGetTextWidth(), and Cezpdf::ezTable().
| Cpdf::line | ( | $ | x1, | |
| $ | y1, | |||
| $ | x2, | |||
| $ | y2 | |||
| ) |
draw a line from one set of coordinates to another
Definition at line 1681 of file class.pdf.php.
Referenced by Cezpdf::alink(), Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), BitPdf::hr(), and Cezpdf::uline().
| Cpdf::md5_16 | ( | $ | string | ) |
calculate the 16 byte version of the 128 bit md5 digest of the string
Definition at line 1091 of file class.pdf.php.
References $i, $out, and $tmp.
Referenced by encryptInit(), and o_encryption().
| 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 1272 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:

| 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 1857 of file class.pdf.php.
References $i, o_page(), restoreState(), saveState(), setColor(), and setStrokeColor().
Referenced by Cezpdf::ezNewPage().
Here is the call graph for this function:

| Cpdf::o_action | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an action object, used to link to URLS initially
Definition at line 731 of file class.pdf.php.
References $action, $options, $res, ARC4(), encryptInit(), and filterText().
Referenced by o_annotation().
Here is the call 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 774 of file class.pdf.php.
References $action, $options, $pageId, $res, link, o_action(), o_page(), and url.
Referenced by addInternalLink(), and addLink().
Here is the call graph for this function:

| Cpdf::o_catalog | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
define the document catalog, the overall controller for the document
Definition at line 302 of file class.pdf.php.
References $action, $options, $res, o_viewerPreferences(), and openHere().
Referenced by newDocument(), o_outlines(), and o_pages().
Here is the call 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 895 of file class.pdf.php.
References $action, $options, $res, $tmp, ARC4(), and encryptInit().
Referenced by o_image(), o_page(), and selectFont().
Here is the call graph for this function:

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

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

| Cpdf::o_fontDescriptor | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
a font descriptor, needed for including additional fonts
Definition at line 564 of file class.pdf.php.
References $action, $options, and $res.
Referenced by selectFont().
| Cpdf::o_fontEncoding | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
| Cpdf::o_image | ( | $ | id, | |
| $ | action, | |||
| $ | options = '' | |||
| ) |
an image object, will be an XObject in the document, includes description and data
Definition at line 945 of file class.pdf.php.
References $action, $options, $res, $tmp, ARC4(), encryptInit(), image, o_contents(), o_pages(), and o_procset().
Here is the call graph for this function:
