Inheritance diagram for Cpdf:

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) | |
Data Fields | |
| $numObj = 0 | |
| $objects = array() | |
| $catalogId | |
| $fonts = array() | |
| $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 = array() | |
| $nStateStack = 0 | |
| $numPages = 0 | |
| $stack = array() | |
| $nStack = 0 | |
| $looseObjects = array() | |
| $addLooseObjects = array() | |
| $infoObject = 0 | |
| $numImages = 0 | |
| $options = array('compression'=>1) | |
| $firstPageId | |
| $wordSpaceAdjust = 0 | |
| $procsetObjectId | |
| $fontFamilies = array() | |
| $currentTextState = '' | |
| $messages = '' | |
| $arc4 = '' | |
| $arc4_objnum = 0 | |
| $fileIdentifier = '' | |
| $encrypted = 0 | |
| $encryptionKey = '' | |
| $callback = array() | |
| $nCallback = 0 | |
| $destinations = array() | |
| $checkpoint = '' | |
Definition at line 23 of file class.pdf.php.
|
|
Definition at line 197 of file class.pdf.php. References newDocument(), and setFontFamily(). Referenced by Cezpdf::Cezpdf(). |
|
|
add content to the currently active object private Definition at line 1648 of file class.pdf.php. |
|
||||||||||||||||||||||||
|
create a labelled destination within the document Definition at line 2969 of file class.pdf.php. Referenced by Creport::rf(). |
|
||||||||||||||||||||||||||||
|
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 2870 of file class.pdf.php. |
|
||||||||||||
|
add content to the documents info object Definition at line 2590 of file class.pdf.php. |
|
||||||||||||||||||||||||
|
add a link in the document to an internal destination (ie. within the document) Definition at line 1173 of file class.pdf.php. |
|
||||||||||||||||||||||||
|
add a JPEG image into the document, from a file Definition at line 2825 of file class.pdf.php. |
|
||||||||||||||||||||||||||||||||||||
|
common code used by the two JPEG adding functions private Definition at line 2931 of file class.pdf.php. |
|
||||||||||||||||||||||||
|
add a link in the document to an external URL Definition at line 1164 of file class.pdf.php. References $info. |
|
|
used to add messages for use in debugging Definition at line 3022 of file class.pdf.php. Referenced by Cezpdf::ezWhatPageNumber(), and o_font(). |
|
||||||||||||
|
after an object has been created, it wil only show if it has been added, using this function. Definition at line 2544 of file class.pdf.php. Referenced by Cezpdf::ezTable(). |
|
||||||||||||||||||||||||
|
add a PNG image into the document, from a file this should work with remote files Definition at line 2637 of file class.pdf.php. |
|
||||||||||||||||||||||||||||
|
add text to the document, at a specified location, size and angle on the page Definition at line 2156 of file class.pdf.php. Referenced by Creport::dots(), Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable(). |
|
||||||||||||||||||||||||||||||||||||
|
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 2331 of file class.pdf.php. Referenced by Cezpdf::ezTable(), and Cezpdf::ezText(). |
|
|
ARC4 encrypt a text string Definition at line 1138 of file class.pdf.php. |
|
|
initialize the ARC4 encryption Definition at line 1112 of file class.pdf.php. |
|
|
should be used for internal checks, not implemented as yet Definition at line 1214 of file class.pdf.php. |
|
|
close an object Definition at line 2518 of file class.pdf.php. Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable(). |
|
||||||||||||||||||||||||||||||||||||
|
draw a bezier curve based on 4 control points Definition at line 1682 of file class.pdf.php. |
|
||||||||||||||||||||||||||||||||||||||||||||
|
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 1713 of file class.pdf.php. |
|
|
initialize the encryption for processing a particular object Definition at line 1098 of file class.pdf.php. References $tmp. |
|
||||||||||||||||||||||||||||||||||||
|
draw a filled ellipse Definition at line 1699 of file class.pdf.php. |
|
||||||||||||||||||||
|
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 1835 of file class.pdf.php. References width. Referenced by Cezpdf::ezTable(). |
|
|
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 1958 of file class.pdf.php. Referenced by o_info(). |
|
|
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 1639 of file class.pdf.php. Referenced by Cezpdf::Cezpdf(). |
|
|
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 1943 of file class.pdf.php. Referenced by Cezpdf::ezTable(). |
|
|
return the height in units of the current font in the given size Definition at line 1929 of file class.pdf.php. Referenced by Cezpdf::ezTable(), and Cezpdf::ezText(). |
|
||||||||||||
|
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 2248 of file class.pdf.php. Referenced by Cezpdf::ezPRVTaddPageNumbers(), Cezpdf::ezPrvtGetTextWidth(), and Cezpdf::ezTable(). |
|
||||||||||||||||||||
|
draw a line from one set of coordinates to another Definition at line 1675 of file class.pdf.php. Referenced by Creport::dots(), Cezpdf::ezPrvtGetTextWidth(), Cezpdf::ezPrvtTableDrawLines(), Cezpdf::ezTable(), and Cezpdf::ezText(). |
|
|
calculate the 16 byte version of the 128 bit md5 digest of the string Definition at line 1086 of file class.pdf.php. References $tmp. |
|
|
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 1267 of file class.pdf.php. Referenced by Cpdf(). |
|
||||||||||||||||
|
add a new page to the document this also makes the new page the current active object Definition at line 1851 of file class.pdf.php. References $opt. Referenced by Cezpdf::ezNewPage(), and Cezpdf::ezTable(). |
|
||||||||||||||||
|
an action object, used to link to URLS initially Definition at line 726 of file class.pdf.php. |
|
||||||||||||||||
|
an annotation object, this will add an annotation to the current page. initially will support just link annotations Definition at line 769 of file class.pdf.php. |
|
||||||||||||||||
|
define the document catalog, the overall controller for the document Definition at line 297 of file class.pdf.php. References $action, $o, $options, $res, o_viewerPreferences(), and openHere(). Referenced by o_outlines(), and o_pages(). |
|
||||||||||||||||
|
the contents objects hold all of the content which appears on pages Definition at line 890 of file class.pdf.php. |
|
||||||||||||||||
|
destination object, used to specify the location for the user to jump to, presently on opening Definition at line 224 of file class.pdf.php. |
|
||||||||||||||||
|
encryption object. Definition at line 1015 of file class.pdf.php. |
|
||||||||||||||||
|
an object to hold the font description Definition at line 475 of file class.pdf.php. References $o, $options, $res, addMessage(), name, o_fontEncoding(), and o_pages(). |
|
||||||||||||||||
|
a font descriptor, needed for including additional fonts Definition at line 559 of file class.pdf.php. |
|
||||||||||||||||
|
the font encoding Definition at line 610 of file class.pdf.php. References $label, $num, $o, $res, and label. Referenced by o_font(). |
|
||||||||||||||||
|
an image object, will be an XObject in the document, includes description and data Definition at line 940 of file class.pdf.php. |
|
||||||||||||||||
|
define the document information Definition at line 682 of file class.pdf.php. References $o, $res, and filterText(). |
|
||||||||||||||||
|
define the outlines in the doc, empty for now Definition at line 445 of file class.pdf.php. References $o, $options, $res, and o_catalog(). |
|
||||||||||||||||
|
a page object, it also creates a contents object to hold its contents Definition at line 821 of file class.pdf.php. |
|
||||||||||||||||
|
object which is a parent to the pages in the document Definition at line 347 of file class.pdf.php. References $i, $o, $options, $res, $tmp, label, and o_catalog(). Referenced by o_font(), and o_procset(). |
|
||||||||||||||||
|
the document procset, solves some problems with printing to old PS printers Definition at line 647 of file class.pdf.php. |
|
||||||||||||||||
|
set the viewer preferences Definition at line 259 of file class.pdf.php. Referenced by o_catalog(). |
|
|
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 1306 of file class.pdf.php. |
|
||||||||||||||||||||
|
specify where the document should open when it first starts Definition at line 2949 of file class.pdf.php. Referenced by o_catalog(). |
|
|
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 2490 of file class.pdf.php. Referenced by Cezpdf::ezTable(). |
|
|
return the pdf stream as a string returned from the function Definition at line 1220 of file class.pdf.php. References $tmp. Referenced by Cezpdf::ezOutput(). |
|
||||||||||||||||||||||||||||||||||||
|
draw a part of an ellipse Definition at line 1692 of file class.pdf.php. |
|
||||||||||||||||
|
draw a polygon, the syntax for this is similar to the GD polygon command Definition at line 1818 of file class.pdf.php. |
|
||||||||||||||||
|
extract an integer from a position in a byte stream private Definition at line 2623 of file class.pdf.php. |
|
||||||||||||||||||||||||||||
|
do a part of the calculation for sorting out the justification of the text private Definition at line 2300 of file class.pdf.php. |
|
||||||||||||||||
|
wrapper function for PRVTcheckTextDirective1 private Definition at line 1993 of file class.pdf.php. |
|
||||||||||||||||||||||||||||||||||||||||
|
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 2008 of file class.pdf.php. |
|
||||||||||||||||||||||||||||
|
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 1977 of file class.pdf.php. |
|
||||||||||||||||||||
|
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 1843 of file class.pdf.php. References width. |
|
|
open an existing object for editing Definition at line 2505 of file class.pdf.php. Referenced by Cezpdf::ezPRVTaddPageNumbers(), and Cezpdf::ezTable(). |
|
|
restore a previously saved state Definition at line 2471 of file class.pdf.php. Referenced by Creport::dots(), and Cezpdf::ezTable(). |
|
|
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 2447 of file class.pdf.php. Referenced by Creport::dots(), and Cezpdf::ezTable(). |
|
||||||||||||||||
|
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 1417 of file class.pdf.php. References $d, $data, $i, $list, $num, $tmp, name, and width. |
|
||||||||||||||||||||
|
sets the colour for fill operations Definition at line 1655 of file class.pdf.php. Referenced by Cezpdf::ezTable(). |
|
|
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 1611 of file class.pdf.php. |
|
||||||||||||||||
|
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 1184 of file class.pdf.php. |
|
||||||||||||
|
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 2985 of file class.pdf.php. Referenced by Cpdf(). |
|
||||||||||||||||||||||||
|
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 1789 of file class.pdf.php. References width. Referenced by Creport::dots(), Cezpdf::ezPrvtTableDrawLines(), and Cezpdf::ezTable(). |
|
||||||||||||
|
set the viewer preferences of the document, it is up to the browser to obey these. Definition at line 2607 of file class.pdf.php. |
|
||||||||||||||||||||
|
sets the colour for stroke operations Definition at line 1665 of file class.pdf.php. Referenced by Cezpdf::ezPrvtTableDrawLines(), and Cezpdf::ezTable(). |
|
|
stop an object from appearing on pages from this point on Definition at line 2533 of file class.pdf.php. |
|
|
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 1899 of file class.pdf.php. References $tmp. Referenced by Cezpdf::ezStream(). |
|
|
a few functions which should allow the document to be treated transactionally. Definition at line 3029 of file class.pdf.php. Referenced by Cezpdf::ezPrvtTableColumnHeadings(), and Cezpdf::ezTable(). |
|
|
array contains infomation about how the loose objects are to be added to the document Definition at line 111 of file class.pdf.php. |
|
|
the ancryption array for the document encryption is stored here Definition at line 156 of file class.pdf.php. |
|
|
the object Id of the encryption information Definition at line 160 of file class.pdf.php. |
|
|
array which forms a stack to keep track of nested callback functions Definition at line 176 of file class.pdf.php. |
|
|
the objectId (number within the objects array) of the document catalog Definition at line 36 of file class.pdf.php. |
|
|
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 191 of file class.pdf.php. |
|
|
the current base font Definition at line 49 of file class.pdf.php. |
|
|
current colour for fill operations, defaults to inactive value, all three components should be between 0 and 1 inclusive when active Definition at line 73 of file class.pdf.php. |
|
|
object number of the currently active contents block Definition at line 65 of file class.pdf.php. |
|
|
a record of the current font Definition at line 45 of file class.pdf.php. |
|
|
the number of the current font within the font array Definition at line 53 of file class.pdf.php. |
|
|
current style that lines are drawn in Definition at line 81 of file class.pdf.php. |
|
|
Definition at line 57 of file class.pdf.php. |
|
|
object number of the current page Definition at line 61 of file class.pdf.php. |
|
|
current colour for stroke operations (lines etc.) Definition at line 77 of file class.pdf.php. |
|
|
track if the current font is bolded or italicised Definition at line 148 of file class.pdf.php. |
|
|
store label->id pairs for named destinations, these will be used to replace internal links done this way so that destinations can be defined after the location that links to them Definition at line 185 of file class.pdf.php. |
|
|
a flag to say if a document is to be encrypted or not Definition at line 168 of file class.pdf.php. |
|
|
the ancryption key for the encryption of all the document content (structure is not encrypted) Definition at line 172 of file class.pdf.php. |
|
|
the file identifier, used to uniquely identify a pdf document Definition at line 164 of file class.pdf.php. |
|
|
the objectId of the first page of the document Definition at line 129 of file class.pdf.php. |
|
|
store the information about the relationship between font families this used so that the code knows which font is the bold version of another font, etc. the value of this array is initialised in the constuctor function. Definition at line 144 of file class.pdf.php. |
|
|
array carrying information about the fonts that the system currently knows about used to ensure that a font is not loaded twice, among other things Definition at line 41 of file class.pdf.php. |
|
|
the objectId of the information object for the document this contains authorship, title etc. Definition at line 116 of file class.pdf.php. |
|
|
an array which contains information about the objects which are not firmly attached to pages these have been added with the addObject function Definition at line 107 of file class.pdf.php. |
|
|
messages are stored here during processing, these can be selected afterwards to give some useful debug information Definition at line 152 of file class.pdf.php. |
|
|
the number of callback functions in the callback array Definition at line 180 of file class.pdf.php. |
|
|
number of elements within the object Id storage stack Definition at line 102 of file class.pdf.php. |
|
|
number of elements within the state stack Definition at line 90 of file class.pdf.php. |
|
|
number of fonts within the system Definition at line 69 of file class.pdf.php. |
|
|
number of images being tracked within the document Definition at line 120 of file class.pdf.php. |
|
|
the current number of pdf objects in the document Definition at line 28 of file class.pdf.php. |
|
|
number of page objects within the document Definition at line 94 of file class.pdf.php. |
|
|
this array contains all of the pdf objects, ready for final assembly Definition at line 32 of file class.pdf.php. |
|
|
an array containing options about the document it defaults to turning on the compression of the objects Definition at line 125 of file class.pdf.php. Referenced by Cezpdf::ezColumnsStart(), Cezpdf::ezPrvtTableColumnHeadings(), Cezpdf::ezTable(), Cezpdf::ezText(), o_catalog(), o_destination(), o_font(), o_outlines(), o_pages(), and o_procset(). |
|
|
the object Id of the procset object Definition at line 138 of file class.pdf.php. |
|
|
object Id storage stack Definition at line 98 of file class.pdf.php. |
|
|
an array which is used to save the state of the document, mainly the colours and styles it is used to temporarily change to another state, the change back to what it was before Definition at line 86 of file class.pdf.php. |
|
|
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 134 of file class.pdf.php. |
1.4.4