Pdf/Page.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Version
$Id$  

\Zend_Pdf_Page

Package: Zend_Pdf
PDF Page
Parent(s)
\Zend_Pdf_Canvas_Abstract
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  SIZE_A4 = '595:842:'
Size representing an A4 page in portrait (tall) orientation.
>VConstant  SIZE_A4_LANDSCAPE = '842:595:'
Size representing an A4 page in landscape (wide) orientation.
>VConstant  SIZE_LETTER = '612:792:'
Size representing a US Letter page in portrait (tall) orientation.
>VConstant  SIZE_LETTER_LANDSCAPE = '792:612:'
Size representing a US Letter page in landscape (wide) orientation.
>VConstant  SHAPE_DRAW_STROKE = 0
Stroke the path only. Do not fill.
>VConstant  SHAPE_DRAW_FILL = 1
Fill the path only. Do not stroke.
>VConstant  SHAPE_DRAW_FILL_AND_STROKE = 2
Fill and stroke the path.
>VConstant  FILL_METHOD_NON_ZERO_WINDING = 0
Fill the path using the non-zero winding rule.
>VConstant  FILL_METHOD_EVEN_ODD = 1
Fill the path using the even-odd rule.
>VConstant  LINE_DASHING_SOLID = 0
Solid line dash.

Properties

>VPropertyprotectedboolean $_attached
Flag which signals, that page is created separately from any PDF document or attached to anyone.
Details
Type
boolean
>VPropertyprotected\Zend_Pdf_Element_Reference|\Zend_Pdf_Element_Object $_dictionary
Page dictionary (refers to an inderect Zend_Pdf_Element_Dictionary object).
>VPropertyprotected\Zend_Pdf_ElementFactory_Interface $_objFactory = null
PDF objects factory.
Default valuenullDetails
Type
\Zend_Pdf_ElementFactory_Interface
>VPropertyprotectedboolean $_safeGS
Safe Graphics State semafore
If it's false, than we can't be sure Graphics State is restored withing context of previous contents stream (ex. drawing coordinate system may be rotated). We should encompass existing content with save/restore GS operators
Details
Type
boolean

Methods

methodpublic__clone() : void

Clone page, extract it and dependent objects from the current document, so it can be used within other docs.

methodpublic__construct(mixed $param1, mixed $param2 = null, mixed $param3 = null) : void

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
NameTypeDescription
$param1mixed
$param2mixed
$param3mixed
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodprotected_addProcSet(string $procSetName) : void

Add procedureSet to the Page description

Parameters
NameTypeDescription
$procSetNamestring
methodprotected_attachResource(string $type, \Zend_Pdf_Resource $resource) : string

Attach resource to the canvas

Method returns a name of the resource which can be used as a resource reference within drawing instructions stream Allowed types: 'ExtGState', 'ColorSpace', 'Pattern', 'Shading', 'XObject', 'Font', 'Properties'
Parameters
NameTypeDescription
$typestring
$resource\Zend_Pdf_Resource
Returns
TypeDescription
string
methodpublicattachAnnotation(\Zend_Pdf_Annotation $annotation) : \Zend_Pdf_Page

Parameters
NameTypeDescription
$annotation\Zend_Pdf_Annotation
Returns
TypeDescription
\Zend_Pdf_Page
methodpublicextractFont( $fontName) : \Zend_Pdf_Resource_Font_Extracted | null

Extract font attached to the page by specific font name

$fontName should be specified in UTF-8 encoding
Parameters
NameTypeDescription
$fontName
Returns
TypeDescription
\Zend_Pdf_Resource_Font_Extracted | null
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodpublicextractFonts() : array

Extract fonts attached to the page

returns array of Zend_Pdf_Resource_Font_Extracted objects
Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Pdf_Exception
methodpublicflush() : void

Dump current drawing instructions into the content stream.

Throws
ExceptionDescription
\Zend_Pdf_Exception
Details
Todo
Don't forget to close all current graphics operations (like path drawing)  
methodpublicgetHeight() : float

Return the height of this page in points.

Returns
TypeDescription
float
methodpublicgetWidth() : float

Return the width of this page in points.

Returns
TypeDescription
float
methodpublicrender(\Zend_Pdf_ElementFactory_Interface $objFactory) : void

Prepare page to be rendered into PDF.

Parameters
NameTypeDescription
$objFactory\Zend_Pdf_ElementFactory_Interface
Throws
ExceptionDescription
\Zend_Pdf_Exception
Details
Todo
Don't forget to close all current graphics operations (like path drawing)  
Documentation was generated by phpDocumentor 2.2.0 .