| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect1 id="zend.pdf.interactive-features">
- <title>Interactive Features</title>
- <sect2 id="zend.pdf.pages.interactive-features.destinations">
- <title>Destinations</title>
-
- <para>
- A destination defines a particular view of a document, consisting of the following
- items:
- <itemizedlist>
- <listitem>
- <para>The page of the document to be displayed.</para>
- </listitem>
-
- <listitem>
- <para>The location of the document window on that page.</para>
- </listitem>
-
- <listitem>
- <para>The magnification (zoom) factor to use when displaying the page.</para>
- </listitem>
- </itemizedlist>
- Destinations may be associated with outline items (<xref
- linkend="zend.pdf.pages.interactive-features.outlines" />), annotations
- (<xref linkend="zend.pdf.pages.interactive-features.annotations" />), or actions
- (<xref linkend="zend.pdf.pages.interactive-features.actions" />). In each case,
- the destination specifies the view of the document to be presented when the outline
- item or annotation is opened or the action is performed. In addition, the optional
- document open action can be specified.
- </para>
- <sect3 id="zend.pdf.pages.interactive-features.destinations.types">
- <title>Supported Destination Types</title>
-
- <para>
- The following types are supported by Zend_Pdf component.
- </para>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.zoom">
- <title>Zend_Pdf_Destination_Zoom</title>
- <para>
- Display the specified page, with the coordinates (left, top) positioned at
- the upper-left corner of the window and the contents of the page magnified
- by the factor zoom.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_Zoom::create($page, $left = null, $top = null, $zoom = null)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$left</varname> is a left edge of the displayed page
- (float).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$top</varname> is a top edge of the displayed page
- (float).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$zoom</varname> is a zoom factor (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <code>null</code>, specified for <varname>$left</varname>,
- <varname>$top</varname> or <varname>$zoom</varname> parameter means
- "current viewer application value".
- </para>
-
- <para>
- <classname>Zend_Pdf_Destination_Zoom</classname> class also provides
- the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getLeftEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setLeftEdge(float $left)</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getTopEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setTopEdge(float $top)</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getZoomFactor()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getZoomFactor()</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <methodname>setZoomFactor(float $zoom)</methodname>;
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit">
- <title>Zend_Pdf_Destination_Fit</title>
- <para>
- Display the specified page, with the coordinates (left, top) positioned at
- the upper-left corner of the window and the contents of the page magnified
- by the factor zoom.
- Display the specified page, with its contents magnified just enough to fit
- the entire page within the window both horizontally and vertically. If
- the required horizontal and vertical magnification factors are different, use
- the smaller of the two, centering the page within the window in the other
- dimension.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_Fit::create($page)</methodname>
- method.
- </para>
-
- <para>
- Where <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-horizontally">
- <title>Zend_Pdf_Destination_FitHorizontally</title>
- <para>
- Display the specified page, with the vertical coordinate top positioned at
- the top edge of the window and the contents of the page magnified just enough
- to fit the entire width of the page within the window.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitHorizontally::create($page, $top)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$top</varname> is a top edge of the displayed page
- (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <classname>Zend_Pdf_Destination_FitHorizontally</classname> class also
- provides the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getTopEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setTopEdge(float $top)</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-vertically">
- <title>Zend_Pdf_Destination_FitVertically</title>
- <para>
- Display the specified page, with the horizontal coordinate left positioned
- at the left edge of the window and the contents of the page magnified just
- enough to fit the entire height of the page within the window.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitVertically::create($page, $left)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$left</varname> is a left edge of the displayed page
- (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <classname>Zend_Pdf_Destination_FitVertically</classname> class also
- provides the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getLeftEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setLeftEdge(float $left)</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-rectangle">
- <title>Zend_Pdf_Destination_FitRectangle</title>
- <para>
- Display the specified page, with its contents magnified just enough to fit
- the rectangle specified by the coordinates left, bottom, right, and top
- entirely within the window both horizontally and vertically. If the required
- horizontal and vertical magnification factors are different, use the smaller
- of the two, centering the rectangle within the window in the other dimension.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitRectangle::create($page, $left, $bottom, $right, $top)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$left</varname> is a left edge of the displayed page
- (float).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$bottom</varname> is a bottom edge of the displayed page
- (float).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$right</varname> is a right edge of the displayed page
- (float).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$top</varname> is a top edge of the displayed page
- (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <classname>Zend_Pdf_Destination_FitRectangle</classname> class also
- provides the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getLeftEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setLeftEdge(float $left)</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getBottomEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setBottomEdge(float $bottom)</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getRightEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setRightEdge(float $right)</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>float getTopEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setTopEdge(float $top)</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-bounding-box">
- <title>Zend_Pdf_Destination_FitBoundingBox</title>
- <para>
- Display the specified page, with its contents magnified just enough to fit
- its bounding box entirely within the window both horizontally and vertically.
- If the required horizontal and vertical magnification factors are different,
- use the smaller of the two, centering the bounding box within the window in
- the other dimension.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitBoundingBox::create($page, $left, $bottom, $right, $top)</methodname>
- method.
- </para>
-
- <para>
- Where <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-bounding-box-horizontally">
- <title>Zend_Pdf_Destination_FitBoundingBoxHorizontally</title>
- <para>
- Display the specified page, with the vertical coordinate top positioned at
- the top edge of the window and the contents of the page magnified just enough
- to fit the entire width of its bounding box within the window.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitBoundingBoxHorizontally::create($page, $top)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$top</varname> is a top edge of the displayed page
- (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <classname>Zend_Pdf_Destination_FitBoundingBoxHorizontally</classname> class
- also provides the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getTopEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setTopEdge(float $top)</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.fit-bounding-box-vertically">
- <title>Zend_Pdf_Destination_FitBoundingBoxVertically</title>
- <para>
- Display the specified page, with the horizontal coordinate left positioned at
- the left edge of the window and the contents of the page magnified just
- enough to fit the entire height of its bounding box within the window.
- </para>
-
- <para>
- Destination object may be created using
- <methodname>Zend_Pdf_Destination_FitBoundingBoxVertically::create($page, $left)</methodname>
- method.
- </para>
-
- <para>
- Where
- <itemizedlist>
- <listitem>
- <para>
- <varname>$page</varname> is a destination page
- (a <classname>Zend_Pdf_Page</classname> object or a page number).
- </para>
- </listitem>
-
- <listitem>
- <para>
- <varname>$left</varname> is a left edge of the displayed page
- (float).
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <classname>Zend_Pdf_Destination_FitBoundingBoxVertically</classname> class
- also provides the following methods:
- <itemizedlist>
- <listitem>
- <para><methodname>float getLeftEdge()</methodname>;</para>
- </listitem>
-
- <listitem>
- <para><methodname>setLeftEdge(float $left)</methodname>;</para>
- </listitem>
- </itemizedlist>
- </para>
- </sect4>
- <sect4 id="zend.pdf.pages.interactive-features.destinations.types.named">
- <title>Zend_Pdf_Destination_Named</title>
- <para>
- All destinations listed above are "Explicit Destinations".
- </para>
- <para>
- In addition to this, PDF document may contain a dictionary of such
- destinations which may be used to reference from outside the PDF
- (e.g. 'http://www.mycompany.com/document.pdf#chapter3').
- </para>
-
- <para>
- <classname>Zend_Pdf_Destination_Named</classname> objects allow to refer
- destinations from the document named destinations dictionary.
- </para>
-
- <para>
- Named destination object may be created using
- <methodname>Zend_Pdf_Destination_Named::create(string $name)</methodname>
- method.
- </para>
-
- <para>
- <classname>Zend_Pdf_Destination_Named</classname> class provides the only one
- additional method:
- </para>
- <para>
- <methodname>string getName()</methodname>;
- </para>
- </sect4>
- </sect3>
- <sect3 id="zend.pdf.pages.interactive-features.destinations.processing">
- <title>Document level destination processing</title>
-
- <para>
- <classname>Zend_Pdf</classname> class provides a set of destinations processing
- methods.
- </para>
-
- <para>
- Each destination object (including named destinations) can be resolved using the
- <methodname>resolveDestination($destination)</methodname> method. It returns
- corresponding <classname>Zend_Pdf_Page</classname> object, if destination target
- is found, or <code>null</code> otherwise.
- </para>
-
- <para>
- <methodname>Zend_Pdf::resolveDestination()</methodname> method also takes
- an optional boolean parameter <varname>$refreshPageCollectionHashes</varname>,
- which is true by default. It forces <classname>Zend_Pdf</classname> object
- to refresh internal page collection hashes since document pages list may be
- updated by user using <varname>Zend_Pdf::$pages</varname> property
- (<xref linkend="zend.pdf.pages" />). It may be turned off for performance reasons,
- if it's known that document pages list wasn't changed since last method
- request.
- </para>
- <para>
- Complete list of named destinations can be retrieved using
- <methodname>Zend_Pdf::getNamedDestinations()</methodname> method. It returns
- an array of <classname>Zend_Pdf_Target</classname> objects, which are actually
- either an explicit destination or a GoTo action
- (<xref linkend="zend.pdf.pages.interactive-features.actions" />).
- </para>
- <para>
- <methodname>Zend_Pdf::getNamedDestination(string $name)</methodname> method returns
- specified named destination (an explicit destination or a GoTo action).
- </para>
-
- <para>
- PDF document named destinations dictionary may be updated with
- <methodname>Zend_Pdf::setNamedDestination(string $name, $destination)</methodname>
- method, where <varname>$destination</varname> is either an explicit destination
- (any destination except <classname>Zend_Pdf_Destination_Named</classname>) or
- a GoTo action.
- </para>
-
- <para>
- If <code>null</code> is specified in place of <varname>$destination</varname>,
- then specified named destination is removed.
- </para>
-
- <note>
- <para>
- Unresolvable named destinations are automatically removed from a document
- while document saving.
- </para>
- </note>
- </sect3>
- <example id="zend.pdf.interactive-features.destinations.example-1">
- <title>Destinations usage example</title>
- <programlisting language="php"><![CDATA[
- $pdf = new Zend_Pdf();
- $page1 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
- $page2 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
- $page3 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); // Page created, but not included into pages list
- $pdf->pages[] = $page1;
- $pdf->pages[] = $page2;
- $destination1 = Zend_Pdf_Destination_Fit::create($page2);
- $destination2 = Zend_Pdf_Destination_Fit::create($page3);
- $page = $pdf->resolveDestination($destination1); // Returns $page2 object
- $page = $pdf->resolveDestination($destination2); // Returns null, page 3 is not included into document yet
- $pdf->setNamedDestination('Page2', $destination1);
- $pdf->setNamedDestination('Page3', $destination2);
- $destination = $pdf->getNamedDestination('Page3'); // Returns $destination2
- $pdf->resolveDestination(Zend_Pdf_Destination_Named::create('Page2')); // Returns $destination1
- $pdf->resolveDestination(Zend_Pdf_Destination_Named::create('Page3')); // Returns null, page 3 is not
- // included into document yet
- ]]></programlisting>
- </example>
- </sect2>
- <sect2 id="zend.pdf.pages.interactive-features.actions">
- <title>Actions</title>
- <para>
- Instead of simply jumping to a destination in the document, an annotation or
- outline item can specify an action for the viewer application to perform,
- such as launching an application, playing a sound, or changing an annotation’s
- appearance state.
- </para>
-
- <sect3 id="zend.pdf.pages.interactive-features.actions.types">
- <title>Supported action types</title>
-
- <para>
- The following action types are recognized while loading PDF document:
- <itemizedlist>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_GoTo</classname> - go to
- a destination in the current document.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_GoToR</classname> - go to
- a destination in another document.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_GoToE</classname> - go to
- a destination in an embedded file.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Launch</classname> - launch
- an application or open or print a document.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Thread</classname> - begin reading
- an article thread.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_URI</classname> - resolve a URI.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Sound</classname> - play a sound.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Movie</classname> - play a movie.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Hide</classname> - hides or shows
- one or more annotations on the screen.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Named</classname> - execute an action
- predefined by the viewer application:
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>NextPage</emphasis> - Go to the next page
- of the document.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>PrevPage</emphasis> - Go to the previous
- page of the document.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>FirstPage</emphasis> - Go to the first page
- of the document.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>LastPage</emphasis> - Go to the last page
- of the document.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_SubmitForm</classname> - send data to
- a uniform resource locator.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_ResetForm</classname> - set fields
- to their default values.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_ImportData</classname> - import field
- values from a file.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_JavaScript</classname> - execute
- a JavaScript script.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_SetOCGState</classname> - set the state of
- one or more optional content groups.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Rendition</classname> - control the
- playing of multimedia content (begin, stop, pause, or resume
- a playing rendition).
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_Trans</classname> - update the display
- of a document, using a transition dictionary.
- </para>
- </listitem>
- <listitem>
- <para>
- <classname>Zend_Pdf_Action_GoTo3DView</classname> - set
- the current view of a 3D annotation.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <para>
- Only <claassname>Zend_Pdf_Action_GoTo</claassname> actions can be created by
- user now. It can be done using
- <methodname>Zend_Pdf_Action_GoTo::create($destination)</methodname> method,
- where <varname>$destination</varname> is a
- <classname>Zend_Pdf_Destination</classname> object or string which can be used
- to identify named destination.
- </para>
-
- <para>
- It also supports the following methods:
- </para>
- </sect3>
- <sect3 id="zend.pdf.pages.interactive-features.actions.chaining">
- <title>Actions chaining</title>
-
- <para>
- Actions objects can be chained using <varname>Zend_Pdf_Action::$next</varname>
- public property.
- </para>
-
- <para>
- It's an array of <classname>Zend_Pdf_Action</classname> objects, which also
- may have their sub-actions.
- </para>
-
- <para>
- <classname>Zend_Pdf_Action</classname> class supports RecursiveIterator interface,
- so child actions may be iterated recursively:
- <programlisting language="php"><![CDATA[
- $pdf = new Zend_Pdf();
- $page1 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
- $page2 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
- $page3 = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); // Page created, but not included into pages list
- $pdf->pages[] = $page1;
- $pdf->pages[] = $page2;
- $action1 = Zend_Pdf_Action_GoTo::create(Zend_Pdf_Destination_Fit::create($page2));
- $action2 = Zend_Pdf_Action_GoTo::create(Zend_Pdf_Destination_Fit::create($page3));
- $action3 = Zend_Pdf_Action_GoTo::create(Zend_Pdf_Destination_Named::create('Chapter1'));
- $action4 = Zend_Pdf_Action_GoTo::create(Zend_Pdf_Destination_Named::create('Chapter5'));
- $action2->next[] = $action3;
- $action2->next[] = $action4;
- $action1->next[] = $action2;
- $actionsCount = 1; // Note! Iteration doesn't include top level action and
- // walks through children only
- $iterator = new RecursiveIteratorIterator($action1, RecursiveIteratorIterator::SELF_FIRST);
- foreach ($iterator as $chainedAction) {
- $actionsCount++;
- }
- printf("Actions in a tree: %d\n", $actionsCount++);
- ]]></programlisting>
- </para>
- </sect3>
- </sect2>
- <sect2 id="zend.pdf.pages.interactive-features.outlines">
- <title>Document Outline (bookmarks)</title>
- <para>
- </para>
- </sect2>
- <sect2 id="zend.pdf.pages.interactive-features.annotations">
- <title>Annotations</title>
- <para>
- </para>
- </sect2>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|