• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Pdf_Destination_Named类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Zend_Pdf_Destination_Named的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Pdf_Destination_Named类的具体用法?PHP Zend_Pdf_Destination_Named怎么用?PHP Zend_Pdf_Destination_Named使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Zend_Pdf_Destination_Named类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Create new Zend_Pdf_Action_GoTo object using specified destination
  *
  * @param Zend_Pdf_Destination|string $destination
  * @return Zend_Pdf_Action_GoTo
  */
 public static function create($destination)
 {
     if (is_string($destination)) {
         require_once 'Zend/Pdf/Destination/Named.php';
         $destination = Zend_Pdf_Destination_Named::create($destination);
     }
     if (!$destination instanceof Zend_Pdf_Destination) {
         require_once 'Zend/Pdf/Exception.php';
         throw new Zend_Pdf_Exception('$destination parameter must be a Zend_Pdf_Destination object or string.');
     }
     $dictionary = new Zend_Pdf_Element_Dictionary();
     $dictionary->Type = new Zend_Pdf_Element_Name('Action');
     $dictionary->S = new Zend_Pdf_Element_Name('GoTo');
     $dictionary->Next = null;
     $dictionary->D = $destination->getResource();
     return new Zend_Pdf_Action_GoTo($dictionary, new SplObjectStorage());
 }
开发者ID:Yaoming9,项目名称:Projet-Web-PhP,代码行数:23,代码来源:GoTo.php


示例2: setDestination

 /**
  * Set link annotation destination
  *
  * @param Zend_Pdf_Target|string $target
  * @return Zend_Pdf_Annotation_Link
  */
 public function setDestination($target)
 {
     if (is_string($target)) {
         #require_once 'Zend/Pdf/Destination/Named.php';
         $destination = Zend_Pdf_Destination_Named::create($target);
     }
     if (!$target instanceof Zend_Pdf_Target) {
         #require_once 'Zend/Pdf/Exception.php';
         throw new Zend_Pdf_Exception('$target parameter must be a Zend_Pdf_Target object or a string.');
     }
     $this->_annotationDictionary->touch();
     $this->_annotationDictionary->Dest = $destination->getResource();
     if ($target instanceof Zend_Pdf_Destination) {
         $this->_annotationDictionary->Dest = $target->getResource();
         $this->_annotationDictionary->A = null;
     } else {
         $this->_annotationDictionary->Dest = null;
         $this->_annotationDictionary->A = $target->getResource();
     }
     return $this;
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:27,代码来源:Link.php


示例3: setTarget

 /**
  * Set outline target.
  * Null means no target
  *
  * @param Zend_Pdf_Target|string $target
  * @return Zend_Pdf_Outline
  * @throws Zend_Pdf_Exception
  */
 public function setTarget($target = null)
 {
     $this->_outlineDictionary->touch();
     if (is_string($target)) {
         require_once 'Zend/Pdf/Destination/Named.php';
         $target = Zend_Pdf_Destination_Named::create($target);
     }
     if ($target === null) {
         $this->_outlineDictionary->Dest = null;
         $this->_outlineDictionary->A = null;
     } else {
         if ($target instanceof Zend_Pdf_Destination) {
             $this->_outlineDictionary->Dest = $target->getResource();
             $this->_outlineDictionary->A = null;
         } else {
             if ($target instanceof Zend_Pdf_Action) {
                 $this->_outlineDictionary->Dest = null;
                 $this->_outlineDictionary->A = $target->getResource();
             } else {
                 require_once 'Zend/Pdf/Exception.php';
                 throw new Zend_Pdf_Exception('Outline target has to be Zend_Pdf_Destination or Zend_Pdf_Action object or string');
             }
         }
     }
     return $this;
 }
开发者ID:Yaoming9,项目名称:Projet-Web-PhP,代码行数:34,代码来源:Loaded.php


示例4: Zend_Pdf

<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$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);
// Returns $page2 object
$page = $pdf->resolveDestination($destination1);
// Returns null, page 3 is not included into document yet
$page = $pdf->resolveDestination($destination2);
$pdf->setNamedDestination('Page2', $destination1);
$pdf->setNamedDestination('Page3', $destination2);
// Returns $destination2
$destination = $pdf->getNamedDestination('Page3');
// Returns $destination1
$pdf->resolveDestination(Zend_Pdf_Destination_Named::create('Page2'));
// Returns null, page 3 is not included into document yet
$pdf->resolveDestination(Zend_Pdf_Destination_Named::create('Page3'));
开发者ID:urki,项目名称:urki-test-project,代码行数:27,代码来源:new.php



注:本文中的Zend_Pdf_Destination_Named类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Pdf_Element类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Pdf_Destination类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap