pdf
[ class tree: pdf ] [ index: pdf ] [ all elements ]

Class: Cezpdf

Source Location: d:\website\PhpDocumentor\/pdf/class.ezpdf.php

Class Overview

Cpdf
   |
   --Cezpdf

this class will take the basic interaction facilities of the Cpdf class and make more useful functions so that the user does not have to know all the ins and outs of pdf presentation to produce something pretty.


Author(s):

Version:

  • 009

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods

Class: Cpdf

Cpdf::Cpdf()
class constructor
Cpdf::addDestination()
create a labelled destination within the document
Cpdf::addImage()
add an image into the document, from a GD object
Cpdf::addInfo()
add content to the documents info object
Cpdf::addInternalLink()
add a link in the document to an internal destination (ie. within the document)
Cpdf::addJpegFromFile()
add a JPEG image into the document, from a file
Cpdf::addLink()
add a link in the document to an external URL
Cpdf::addMessage()
used to add messages for use in debugging
Cpdf::addObject()
after an object has been created, it wil only show if it has been added, using this function.
Cpdf::addPngFromFile()
add a PNG image into the document, from a file
Cpdf::addText()
add text to the document, at a specified location, size and angle on the page
Cpdf::addTextWrap()
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.
Cpdf::ARC4()
ARC4 encrypt a text string
Cpdf::ARC4_init()
initialize the ARC4 encryption
Cpdf::checkAllHere()
should be used for internal checks, not implemented as yet
Cpdf::closeObject()
close an object
Cpdf::curve()
draw a bezier curve based on 4 control points
Cpdf::ellipse()
draw an ellipse note that the part and filled ellipse are just special cases of this function
Cpdf::encryptInit()
initialize the encryption for processing a particular object
Cpdf::filledEllipse()
draw a filled ellipse
Cpdf::filledRectangle()
a filled rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not
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.
Cpdf::getFontDecender()
return the font decender, this will normally return a negative number
Cpdf::getFontHeight()
return the height in units of the current font in the given size
Cpdf::getTextWidth()
calculate how wide a given text string will be on a page, at a given size.
Cpdf::line()
draw a line from one set of coordinates to another
Cpdf::md5_16()
calculate the 16 byte version of the 128 bit md5 digest of the string
Cpdf::newPage()
add a new page to the document
Cpdf::openHere()
specify where the document should open when it first starts
Cpdf::openObject()
make a loose object, the output will go into this object, until it is closed, then will revert to the current one.
Cpdf::output()
return the pdf stream as a string returned from the function
Cpdf::o_action()
an action object, used to link to URLS initially
Cpdf::o_annotation()
an annotation object, this will add an annotation to the current page.
Cpdf::o_catalog()
define the document catalog, the overall controller for the document
Cpdf::o_contents()
the contents objects hold all of the content which appears on pages
Cpdf::o_destination()
destination object, used to specify the location for the user to jump to, presently on opening
Cpdf::o_encryption()
encryption object.
Cpdf::o_font()
an object to hold the font description
Cpdf::o_fontDescriptor()
a font descriptor, needed for including additional fonts
Cpdf::o_fontEncoding()
the font encoding
Cpdf::o_image()
an image object, will be an XObject in the document, includes description and data
Cpdf::o_info()
define the document information
Cpdf::o_outlines()
define the outlines in the doc, empty for now
Cpdf::o_page()
a page object, it also creates a contents object to hold its contents
Cpdf::o_pages()
object which is a parent to the pages in the document
Cpdf::o_procset()
the document procset, solves some problems with printing to old PS printers
Cpdf::o_viewerPreferences()
set the viewer preferences
Cpdf::partEllipse()
draw a part of an ellipse
Cpdf::polygon()
draw a polygon, the syntax for this is similar to the GD polygon command
Cpdf::rectangle()
draw a rectangle, note that it is the width and height of the rectangle which are the secondary paramaters, not
Cpdf::reopenObject()
open an existing object for editing
Cpdf::restoreState()
restore a previously saved state
Cpdf::saveState()
this will be called at a new page to return the state to what it was on the
Cpdf::selectFont()
if the font is not loaded then load it and make the required object
Cpdf::setColor()
sets the colour for fill operations
Cpdf::setEncryption()
set the encryption of the document can be used to turn it on and/or set the passwords which it will have.
Cpdf::setFontFamily()
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.
Cpdf::setLineStyle()
this sets the line drawing style.
Cpdf::setPreferences()
set the viewer preferences of the document, it is up to the browser to obey these.
Cpdf::setStrokeColor()
sets the colour for stroke operations
Cpdf::stopObject()
stop an object from appearing on pages from this point on
Cpdf::stream()
output the pdf code, streaming it to the browser
Cpdf::transaction()
a few functions which should allow the document to be treated transactionally.

Class Details

[line 21]
this class will take the basic interaction facilities of the Cpdf class and make more useful functions so that the user does not have to know all the ins and outs of pdf presentation to produce something pretty.



Tags:

author:  Wayne Munro <pdf@ros.co.nz>
version:  009


[ Top ]


Class Variables

$ez = array('fontSize'=>10)

[line 37]


Type:   mixed


[ Top ]

$ezPageCount = 0

[line 40]


Type:   mixed


[ Top ]

$ezPages = array()

[line 39]


Type:   mixed


[ Top ]

$y =

[line 38]


Type:   mixed


[ Top ]



Class Methods


constructor Cezpdf [line 51]

Cezpdf Cezpdf( [ $paper = 'a4'], [ $orientation = 'portrait'])

Assuming that people don't want to specify the paper size using the absolute coordinates allow a couple of options: orientation can be 'portrait' or 'landscape' or, to actually set the coordinates, then pass an array in as the first parameter.

the defaults are as shown.




Parameters:

   $paper  
   $orientation  

[ Top ]

method alink [line 1494]

void alink( $info, [ $internal = 0])



Parameters:

   $info  
   $internal  

[ Top ]

method execTemplate [line 1481]

void execTemplate( $id, [ $data = array()], [ $options = array()])



Parameters:

   $id  
   $data  
   $options  

[ Top ]

method ezColumnsStart [line 165]

void ezColumnsStart( [ $options = array()])



Parameters:

   $options  

[ Top ]

method ezColumnsStop [line 198]

void ezColumnsStop( )



[ Top ]

method ezGetCurrentPageNumber [line 287]

void ezGetCurrentPageNumber( )



[ Top ]

method ezImage [line 1322]

void ezImage( $image, [ $pad = 5], [ $width = 0], [ $resize = 'full'], [ $just = 'center'], [ $border = ''])



Parameters:

   $image  
   $pad  
   $width  
   $resize  
   $just  
   $border  

[ Top ]

method ezInsertMode [line 208]

void ezInsertMode( [ $status = 1], [ $pageNum = 1], [ $pos = 'before'])



Parameters:

   $status  
   $pageNum  
   $pos  

[ Top ]

method ezNewPage [line 225]

void ezNewPage( )



[ Top ]

method ezOutput [line 482]

void ezOutput( [ $options = 0])



Parameters:

   $options  

[ Top ]

method ezProcessText [line 1216]

void ezProcessText( $text)



Parameters:

   $text  

[ Top ]

method ezPRVTaddPageNumbers [line 398]

void ezPRVTaddPageNumbers( )



[ Top ]

method ezPRVTcleanUp [line 469]

void ezPRVTcleanUp( )



[ Top ]

method ezPrvtGetTextWidth [line 612]

void ezPrvtGetTextWidth( $size, $text)



Parameters:

   $size  
   $text  

[ Top ]

method ezPRVTpageNumberSearch [line 381]

void ezPRVTpageNumberSearch( $lbl, &$tmp)



Parameters:

   $lbl  
   &$tmp  

[ Top ]

method ezPrvtTableColumnHeadings [line 547]

void ezPrvtTableColumnHeadings( $cols, $pos, $maxWidth, $height, $decender, $gap, $size, &$y, [ $optionsAll = array()])



Parameters:

   $cols  
   $pos  
   $maxWidth  
   $height  
   $decender  
   $gap  
   $size  
   &$y  
   $optionsAll  

[ Top ]

method ezPrvtTableDrawLines [line 518]

void ezPrvtTableDrawLines( $pos, $gap, $x0, $x1, $y0, $y1, $y2, $col, $inner, $outer, [ $opt = 1])



Parameters:

   $pos  
   $gap  
   $x0  
   $x1  
   $y0  
   $y1  
   $y2  
   $col  
   $inner  
   $outer  
   $opt  

[ Top ]

method ezSetCmMargins [line 155]

void ezSetCmMargins( $top, $bottom, $left, $right)

Set Margins in centimeters



Parameters:

   $top  
   $bottom  
   $left  
   $right  

[ Top ]

method ezSetDy [line 500]

void ezSetDy( $dy, [ $mod = ''])



Parameters:

   $dy  
   $mod  

[ Top ]

method ezSetMargins [line 267]

void ezSetMargins( $top, $bottom, $left, $right)



Parameters:

   $top  
   $bottom  
   $left  
   $right  

[ Top ]

method ezSetY [line 489]

void ezSetY( $y)



Parameters:

   $y  

[ Top ]

method ezStartPageNumbers [line 294]

void ezStartPageNumbers( $x, $y, $size, [ $pos = 'left'], [ $pattern = '{PAGENUM} of {TOTALPAGENUM}'], [ $num = ''])



Parameters:

   $x  
   $y  
   $size  
   $pos  
   $pattern  
   $num  

[ Top ]

method ezStopPageNumbers [line 352]

void ezStopPageNumbers( [ $stopTotal = 0], [ $next = 0], [ $i = 0])



Parameters:

   $stopTotal  
   $next  
   $i  

[ Top ]

method ezStream [line 475]

void ezStream( [ $options = ''])



Parameters:

   $options  

[ Top ]

method ezTable [line 628]

void ezTable( &$data, [ $cols = ''], [ $title = ''], [ $options = ''])



Parameters:

   &$data  
   $cols  
   $title  
   $options  

[ Top ]

method ezText [line 1226]

void ezText( $text, [ $size = 0], [ $options = array()], [ $test = 0])



Parameters:

   $text  
   $size  
   $options  
   $test  

[ Top ]

method ezWhatPageNumber [line 320]

void ezWhatPageNumber( $pageNum, [ $i = 0])



Parameters:

   $pageNum  
   $i  

[ Top ]

method ilink [line 1490]

void ilink( $info)



Parameters:

   $info  

[ Top ]

method loadTemplate [line 1444]

void loadTemplate( $templateFile)



Parameters:

   $templateFile  

[ Top ]

method uline [line 1539]

void uline( $info)



Parameters:

   $info  

[ Top ]


Documentation generated on Thu, 15 Feb 2007 20:33:51 +0000 by phpDocumentor 1.3.0