Gnostice PDFOne
Pro. Ed. v5.0.0


com.gnostice.pdfone
Class PdfURIAction

java.lang.Object
  extended bycom.gnostice.pdfone.PdfAction
      extended bycom.gnostice.pdfone.PdfURIAction

public class PdfURIAction
extends PdfAction

This class represents a URI action.

PdfWriter writer1 = PdfWriter.fileWriter(
           new File("PdfURIAction_example.pdf"));
PdfDocument doc1 = new PdfDocument(writer1);

// Create a PDF page
PdfPage page1 = new PdfPage();

// Render some text on the page
page1.writeText(
        "Click here to visit Gnostice website.", 
        200, 100);

// Create a link annotation over a word rendered on page 1
PdfLinkAnnot lAnnot = 
    new PdfLinkAnnot(new PdfRect(223, 100, 23, 12), Color.BLUE);

// Create a remote go-to action for navigation into page 3
// of another document in the same directory
PdfURIAction ua = 
    new PdfURIAction("www.gnostice.com");

// Add the remote go-to action to the link annotation
lAnnot.addAction(ua);

// Add the link annotation to page 1
page1.addAnnotation(lAnnot);

doc1.add(page1);
doc1.setOpenAfterSave(true);
doc1.write();
writer1.dispose();      


Nested Class Summary
 
Nested classes inherited from class com.gnostice.pdfone.PdfAction
PdfAction.PdfEvent
 
Field Summary
 
Fields inherited from class com.gnostice.pdfone.PdfAction
GOTO, JAVASCRIPT, LAUNCH, NAMED, NAMED_FIND, NAMED_FIRSTPAGE, NAMED_LASTPAGE, NAMED_NEXTPAGE, NAMED_OPEN, NAMED_PREVPAGE, NAMED_PRINT, NAMED_SEARCH, REMOTE_GOTO, URI
 
Constructor Summary
PdfURIAction(String uri)
          Constructs a PDF URI action with specified URI.
 
Method Summary
 String getUri()
          Returns URI that the action will make the viewer application to resolve.
 void prepareActionDict()
           
 void setUri(String uri)
          Sets the action to make the viewer application to resolve specified URI.
 
Methods inherited from class com.gnostice.pdfone.PdfAction
getActionType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfURIAction

public PdfURIAction(String uri)
Constructs a PDF URI action with specified URI.

Parameters:
uri - Uniform Resource Identifier (URI) that the action should make the viewer application to resolve
Method Detail

getUri

public String getUri()
Returns URI that the action will make the viewer application to resolve.

Returns:
URI that the action will make the viewer application to resolve

setUri

public void setUri(String uri)
Sets the action to make the viewer application to resolve specified URI.

Parameters:
uri - URI that the action will make the viewer application to resolve

prepareActionDict

public void prepareActionDict()
                       throws PdfException
Throws:
PdfException

Gnostice PDFOne
Pro. Ed. v5.0.0

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2010 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com