本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}