當前位置: 首頁>>代碼示例>>C#>>正文


C# PdfDestination.AddPage方法代碼示例

本文整理匯總了C#中iTextSharp.text.pdf.PdfDestination.AddPage方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfDestination.AddPage方法的具體用法?C# PdfDestination.AddPage怎麽用?C# PdfDestination.AddPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在iTextSharp.text.pdf.PdfDestination的用法示例。


在下文中一共展示了PdfDestination.AddPage方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: LocalDestination

 /**
 * The local destination to where a local goto with the same
 * name will jump to.
 * @param name the name of this local destination
 * @param destination the <CODE>PdfDestination</CODE> with the jump coordinates
 * @return <CODE>true</CODE> if the local destination was added,
 * <CODE>false</CODE> if a local destination with the same name
 * already existed
 */
 internal bool LocalDestination(String name, PdfDestination destination) {
     Destination dest;
     if (localDestinations.ContainsKey(name))
         dest = localDestinations[name];
     else
         dest = new Destination();
     if (dest.destination != null)
         return false;
     dest.destination = destination;
     localDestinations[name] = dest;
     if (!destination.HasPage())
         destination.AddPage(writer.CurrentPage);
     return true;
 }
開發者ID:NelsonSantos,項目名稱:fyiReporting-Android,代碼行數:23,代碼來源:PdfDocument.cs

示例2: GotoLocalPage

 /** Creates a GoTo action to an internal page.
  * @param page the page to go. First page is 1
  * @param dest the destination for the page
  * @param writer the writer for this action
  * @return a GoTo action
  */    
 public static PdfAction GotoLocalPage(int page, PdfDestination dest, PdfWriter writer) {
     PdfIndirectReference piref = writer.GetPageReference(page);
     PdfDestination d = new PdfDestination(dest);
     d.AddPage(piref);
     PdfAction action = new PdfAction();
     action.Put(PdfName.S, PdfName.GOTO);
     action.Put(PdfName.D, d);
     return action;
 }
開發者ID:yu0410aries,項目名稱:itextsharp,代碼行數:15,代碼來源:PdfAction.cs

示例3: CreateLink

 public static PdfAnnotation CreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest)
 {
     PdfAnnotation annot = CreateLink(writer, rect, highlight);
     PdfIndirectReference piref = writer.GetPageReference(page);
     dest.AddPage(piref);
     annot.Put(PdfName.DEST, dest);
     return annot;
 }
開發者ID:HardcoreSoftware,項目名稱:iSecretary,代碼行數:8,代碼來源:PdfAnnotation.cs

示例4: LocalDestination

 /**
 * The local destination to where a local goto with the same
 * name will jump to.
 * @param name the name of this local destination
 * @param destination the <CODE>PdfDestination</CODE> with the jump coordinates
 * @return <CODE>true</CODE> if the local destination was added,
 * <CODE>false</CODE> if a local destination with the same name
 * already existed
 */
 internal bool LocalDestination(String name, PdfDestination destination) {
     Object[] obj = (Object[])localDestinations[name];
     if (obj == null)
         obj = new Object[3];
     if (obj[2] != null)
         return false;
     obj[2] = destination;
     localDestinations[name] = obj;
     if (!destination.HasPage())
         destination.AddPage(writer.CurrentPage);
     return true;
 }
開發者ID:pusp,項目名稱:o2platform,代碼行數:21,代碼來源:PdfDocument.cs

示例5: AddNamedDestination

 /**
 * Adds one named destination.
 * @param    name    the name for the destination
 * @param    page    the page number where you want to jump to
 * @param    dest    an explicit destination
 * @since    iText 5.0
 */
 virtual public void AddNamedDestination(String name, int page, PdfDestination dest) {
     PdfDestination d = new PdfDestination(dest);
     d.AddPage(GetPageReference(page));
     pdf.LocalDestination(name, d);
 }
開發者ID:joshaxey,項目名稱:Simple-PDFMerge,代碼行數:12,代碼來源:PdfWriter.cs


注:本文中的iTextSharp.text.pdf.PdfDestination.AddPage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。