25 #require_once 'Zend/Pdf/Element.php'; 26 #require_once 'Zend/Pdf/Element/Array.php'; 30 #require_once 'Zend/Pdf/Target.php'; 74 #require_once 'Zend/Pdf/Element.php'; 76 #require_once 'Zend/Pdf/Exception.php'; 77 throw new Zend_Pdf_Exception(
'$dictionary mast be a direct or an indirect dictionary object.');
80 $this->_actionDictionary = $dictionary;
82 if ($dictionary->Next !==
null) {
85 if (!$processedActions->contains($dictionary->Next)) {
86 $processedActions->attach($dictionary->Next);
90 foreach ($dictionary->Next->items as $chainedActionDictionary) {
92 if (!$processedActions->contains($chainedActionDictionary)) {
93 $processedActions->attach($chainedActionDictionary);
98 #require_once 'Zend/Pdf/Exception.php'; 99 throw new Zend_Pdf_Exception(
'PDF Action dictionary Next entry must be a dictionary or an array.');
117 if ($processedActions ===
null) {
118 $processedActions =
new SplObjectStorage();
121 #require_once 'Zend/Pdf/Element.php'; 123 #require_once 'Zend/Pdf/Exception.php'; 124 throw new Zend_Pdf_Exception(
'$dictionary mast be a direct or an indirect dictionary object.');
126 if (isset($dictionary->Type) && $dictionary->Type->value !=
'Action') {
127 #require_once 'Zend/Pdf/Exception.php'; 128 throw new Zend_Pdf_Exception(
'Action dictionary Type entry must be set to \'Action\'.');
131 if ($dictionary->S ===
null) {
132 #require_once 'Zend/Pdf/Exception.php'; 136 switch ($dictionary->S->value) {
138 #require_once 'Zend/Pdf/Action/GoTo.php'; 143 #require_once 'Zend/Pdf/Action/GoToR.php'; 148 #require_once 'Zend/Pdf/Action/GoToE.php'; 153 #require_once 'Zend/Pdf/Action/Launch.php'; 158 #require_once 'Zend/Pdf/Action/Thread.php'; 163 #require_once 'Zend/Pdf/Action/URI.php'; 168 #require_once 'Zend/Pdf/Action/Sound.php'; 173 #require_once 'Zend/Pdf/Action/Movie.php'; 178 #require_once 'Zend/Pdf/Action/Hide.php'; 183 #require_once 'Zend/Pdf/Action/Named.php'; 188 #require_once 'Zend/Pdf/Action/SubmitForm.php'; 193 #require_once 'Zend/Pdf/Action/ResetForm.php'; 198 #require_once 'Zend/Pdf/Action/ImportData.php'; 203 #require_once 'Zend/Pdf/Action/JavaScript.php'; 208 #require_once 'Zend/Pdf/Action/SetOCGState.php'; 213 #require_once 'Zend/Pdf/Action/Rendition.php'; 218 #require_once 'Zend/Pdf/Action/Trans.php'; 223 #require_once 'Zend/Pdf/Action/GoTo3DView.php'; 228 #require_once 'Zend/Pdf/Action/Unknown.php'; 257 if ($processedActions ===
null) {
258 $processedActions =
new SplObjectStorage();
260 if ($processedActions->contains($this)) {
261 #require_once 'Zend/Pdf/Exception.php'; 264 $processedActions->attach($this);
266 $childListUpdated =
false;
269 $childListUpdated =
true;
270 }
else if ( !(array_keys($this->_originalNextList) === array_keys($this->
next)) ) {
272 $childListUpdated =
true;
274 foreach ($this->
next as $key => $childAction) {
275 if ($this->_originalNextList[$key] !== $childAction) {
276 $childListUpdated =
true;
282 if ($childListUpdated) {
283 $this->_actionDictionary->touch();
286 $this->_actionDictionary->Next =
null;
290 $child = reset($this->
next);
291 $this->_actionDictionary->Next = $child->dumpAction(
$factory, $processedActions);
295 #require_once 'Zend/Pdf/Element/Array.php'; 297 foreach ($this->
next as $child) {
299 $pdfChildArray->items[] = $child->dumpAction(
$factory, $processedActions);
301 $this->_actionDictionary->Next = $pdfChildArray;
305 foreach ($this->
next as $child) {
306 $child->dumpAction(
$factory, $processedActions);
312 return $factory->newObject($this->_actionDictionary);
357 return reset($this->
next);
402 return count($this->childOutlines);
dumpAction(Zend_Pdf_ElementFactory_Interface $factory, SplObjectStorage $processedActions=null)
__construct(Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions)
static load(Zend_Pdf_Element $dictionary, SplObjectStorage $processedActions=null)