|
com.aspose.pdf.elements
Class HyperLinkToLocalPdf
java.lang.Object
com.aspose.pdf.elements.HyperLink
com.aspose.pdf.elements.HyperLinkToLocalPdf
public class HyperLinkToLocalPdf - extends HyperLink
Represents a link in a Pdf document that links to local pdf.
|
Constructor Summary |
HyperLinkToLocalPdf(java.lang.String targetID)
Initializes a new instance of the HyperlinkToOuterPdf class. |
|
Method Summary |
java.lang.Object |
clone()
|
java.lang.String |
getTargetID()
Gets a string that indicates the link target ID. |
void |
setHyperLinkXML(org.w3c.dom.Element element)
Sets an Element objet as XML represents. |
void |
setTargetID(java.lang.String targetID)
Sets a string that indicates the link target ID. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HyperLinkToLocalPdf
public HyperLinkToLocalPdf(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:
targetID - A string that indicates the link target ID.
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
- Overrides:
clone in class HyperLink
- Throws:
java.lang.CloneNotSupportedException- See Also:
Object.clone()
setHyperLinkXML
public void setHyperLinkXML(org.w3c.dom.Element element)
- Description copied from class:
HyperLink
- Sets an Element objet as XML represents.
- Overrides:
setHyperLinkXML in class HyperLink
- See Also:
HyperLink.setHyperLinkXML(Element)
|