Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class HyperLinkToLocalPdf

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.HyperLink
          extended bycom.aspose.pdf.elements.HyperLinkToLocalPdf
All Implemented Interfaces:
java.lang.Cloneable

public class HyperLinkToLocalPdf
extends HyperLink

Represents a link in a Pdf document that links to local pdf.


Constructor Summary
HyperLinkToLocalPdf(Segment segment, java.lang.String targetID)
          Initializes a new instance of the HyperlinkToOuterPdf class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 java.lang.String getTargetID()
          Gets a string that indicates the link target ID.
 void setTargetID(java.lang.String targetID)
          Sets a string that indicates the link target ID.
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HyperLinkToLocalPdf

public HyperLinkToLocalPdf(Segment segment,
                           java.lang.String targetID)
Initializes a new instance of the HyperlinkToOuterPdf class.

 [SampleCode]
 Pdf pdf = new Pdf();
 Section sec1 = pdf.getSections().add();
 Text text1 = new Text(sec1);
 Segment seg1 = text1.getSegments().add("a local link to another page in this file.\n");
 seg1.getTextInfo().setTextColor(Color.Blue);
 seg1.getTextInfo().setUnderLine(true);
 HyperLink link = new HyperLinkToLocalPdf(seg1,"anchorID");
 seg1.setHyperLink(link);
 sec1.getParagraphs().add(text1);
 Section sec2 = pdf.getSections().add();
 sec2.getPageSetup().getMargin().setTop(50);
 Text text2 = new Text(sec2,"section2 ");
 text2.getMargin().setTop(30);
 sec2.getParagraphs().add(text2);
 text2.setID("anchorID");
 

Parameters:
segment - The segment that owns the hyperlink.
targetID - A string that indicates the link target ID.
Method Detail

getTargetID

public java.lang.String getTargetID()
Gets a string that indicates the link target ID.


setTargetID

public void setTargetID(java.lang.String targetID)
Sets a string that indicates the link target ID.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: PdfElementBase
Clone an object.

Overrides:
clone in class HyperLink
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class HyperLink
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()