本文整理匯總了C#中iTextSharp.text.pdf.PdfDestination.HasPage方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfDestination.HasPage方法的具體用法?C# PdfDestination.HasPage怎麽用?C# PdfDestination.HasPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.pdf.PdfDestination
的用法示例。
在下文中一共展示了PdfDestination.HasPage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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;
}