コード例 #1
0
ファイル: PdfAction.java プロジェクト: JstnPwll/DroidText
 /**
  * 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 ref = writer.getPageReference(page);
   dest.addPage(ref);
   PdfAction action = new PdfAction();
   action.put(PdfName.S, PdfName.GOTO);
   action.put(PdfName.D, dest);
   return action;
 }
コード例 #2
0
ファイル: PdfOutline.java プロジェクト: JstnPwll/DroidText
 /**
  * Set the page of the <CODE>PdfDestination</CODE>-object.
  *
  * @param pageReference indirect reference to the page
  * @return <CODE>true</CODE> if this page was set as the <CODE>PdfDestination</CODE>-page.
  */
 public boolean setDestinationPage(PdfIndirectReference pageReference) {
   if (destination == null) {
     return false;
   }
   return destination.addPage(pageReference);
 }