|
| __construct ($param1, $param2=null, $param3=null) |
| Object constructor.
|
|
| getResources () |
| Returns dictionaries of used resources.
|
|
| getContents () |
| Get drawing instructions stream.
|
|
| getHeight () |
| Return the height of this page in points.
|
|
| getWidth () |
| Return the width of this page in points.
|
|
| __clone () |
| Clone page, extract it and dependent objects from the current document, so it can be used within other docs.
|
|
| clonePage ($factory, &$processed) |
| Clone page, extract it and dependent objects from the current document, so it can be used within other docs.
|
|
| getPageDictionary () |
| Retrive PDF file reference to the page.
|
|
| flush () |
| Dump current drawing instructions into the content stream.
|
|
| render (Zend_Pdf_ElementFactory_Interface $objFactory) |
| Prepare page to be rendered into PDF.
|
|
| extractResources () |
| Extract resources attached to the page.
|
|
| extractFonts () |
| Extract fonts attached to the page.
|
|
| extractFont ($fontName) |
| Extract font attached to the page by specific font name.
|
|
| attachAnnotation (Zend_Pdf_Annotation $annotation) |
|
| drawCanvas (Zend_Pdf_Canvas_Interface $canvas, $x1, $y1, $x2=null, $y2=null) |
| Draw a canvas at the specified location.
|
|
| setFillColor (Zend_Pdf_Color $color) |
| Set fill color.
|
|
| setLineColor (Zend_Pdf_Color $color) |
| Set line color.
|
|
| setLineWidth ($width) |
| Set line width.
|
|
| setLineDashingPattern ($pattern, $phase=0) |
| Set line dashing pattern.
|
|
| setFont (Zend_Pdf_Resource_Font $font, $fontSize) |
| Set current font.
|
|
| setStyle (Zend_Pdf_Style $style) |
| Set the style to use for future drawing operations on this page.
|
|
| getFont () |
| Get current font.
|
|
| getFontSize () |
| Get current font size.
|
|
| getStyle () |
| Return the style, applied to the page.
|
|
| saveGS () |
| Save the graphics state of this page.
|
|
| restoreGS () |
| Restore the graphics state that was saved with the last call to saveGS().
|
|
| setAlpha ($alpha, $mode= 'Normal') |
| Set the transparancy.
|
|
| clipCircle ($x, $y, $radius, $startAngle=null, $endAngle=null) |
| Intersect current clipping area with a circle.
|
|
| clipEllipse ($x1, $y1, $x2, $y2, $startAngle=null, $endAngle=null) |
| Intersect current clipping area with a polygon.
|
|
| clipPolygon ($x, $y, $fillMethod=Zend_Pdf_Page::FILL_METHOD_NON_ZERO_WINDING) |
| Intersect current clipping area with a polygon.
|
|
| clipRectangle ($x1, $y1, $x2, $y2) |
| Intersect current clipping area with a rectangle.
|
|
| drawCircle ($x, $y, $radius, $param4=null, $param5=null, $param6=null) |
| Draw a circle centered on x, y with a radius of radius.
|
|
| drawEllipse ($x1, $y1, $x2, $y2, $param5=null, $param6=null, $param7=null) |
| Draw an ellipse inside the specified rectangle.
|
|
| drawImage (Zend_Pdf_Resource_Image $image, $x1, $y1, $x2, $y2) |
| Draw an image at the specified position on the page.
|
|
| drawLayoutBox ($box, $x, $y) |
| Draw a LayoutBox at the specified position on the page.
|
|
| drawLine ($x1, $y1, $x2, $y2) |
| Draw a line from x1,y1 to x2,y2.
|
|
| drawPolygon ($x, $y, $fillType=Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE, $fillMethod=Zend_Pdf_Page::FILL_METHOD_NON_ZERO_WINDING) |
| Draw a polygon.
|
|
| drawRectangle ($x1, $y1, $x2, $y2, $fillType=Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE) |
| Draw a rectangle.
|
|
| drawRoundedRectangle ($x1, $y1, $x2, $y2, $radius, $fillType=Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE) |
| Draw a rounded rectangle.
|
|
| drawText ($text, $x, $y, $charEncoding= '') |
| Draw a line of text at the specified position.
|
|
| pathClose () |
| Close the path by drawing a straight line back to it's beginning.
|
|
| pathLine ($x, $y) |
| Continue the open path in a straight line to the specified position.
|
|
| pathMove ($x, $y) |
| Start a new path at the specified position.
|
|
| rotate ($x, $y, $angle) |
| Rotate the page.
|
|
| scale ($xScale, $yScale) |
| Scale coordination system.
|
|
| translate ($xShift, $yShift) |
| Translate coordination system.
|
|
| skew ($x, $y, $xAngle, $yAngle) |
| Translate coordination system.
|
|
| rawWrite ($data, $procSet=null) |
| Writes the raw data to the page's content stream.
|
|
__construct |
( |
|
$param1, |
|
|
|
$param2 = null , |
|
|
|
$param3 = null |
|
) |
| |
Object constructor.
Constructor signatures:
1. Load PDF page from a parsed PDF file. Object factory is created by PDF parser. --------------------------------------------------------- new Zend_Pdf_Page(Zend_Pdf_Element_Dictionary $pageDict, Zend_Pdf_ElementFactory_Interface $factory); ---------------------------------------------------------
2. Make a copy of the PDF page. New page is created in the same context as source page. Object factory is shared. Thus it will be attached to the document, but need to be placed into Zend_Pdf::$pages array to be included into output. --------------------------------------------------------- new Zend_Pdf_Page(Zend_Pdf_Page $page); ---------------------------------------------------------
3. Create new page with a specified pagesize. If $factory is null then it will be created and page must be attached to the document to be included into output. --------------------------------------------------------- new Zend_Pdf_Page(string $pagesize, Zend_Pdf_ElementFactory_Interface $factory = null); ---------------------------------------------------------
4. Create new page with a specified pagesize (in default user space units). If $factory is null then it will be created and page must be attached to the document to be included into output. --------------------------------------------------------- new Zend_Pdf_Page(numeric $width, numeric $height, Zend_Pdf_ElementFactory_Interface $factory = null); ---------------------------------------------------------
- Parameters
-
mixed | $param1 | |
mixed | $param2 | |
mixed | $param3 | |
- Exceptions
-
New page created. That's users App responsibility to track GS changes
- Todo:
- support of user defined pagesize notations, like: "210x297mm", "595x842", "8.5x11in", "612x792"
- Todo:
- support of pagesize recalculation to "default user space units"
New page created. That's users App responsibility to track GS changes
Returns dictionaries of used resources.
Used for canvas implementations interoperability
Structure of the returned array: array( <resTypeName> => array( <resName> => <Zend_Pdf_Resource object>="">, <resName> => <Zend_Pdf_Resource object>="">, <resName> => <Zend_Pdf_Resource object>="">, ... ), <resTypeName> => array( <resName> => <Zend_Pdf_Resource object>="">, <resName> => <Zend_Pdf_Resource object>="">, <resName> => <Zend_Pdf_Resource object>="">, ... ), ... 'ProcSet' => array() )
where ProcSet array is a list of used procedure sets names (strings). Allowed procedure set names: 'PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'
Implements Zend_Pdf_Canvas_Interface.