|
Gnostice PDFOne Java
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gnostice.pdfone.PdfAnnot
com.gnostice.pdfone.PdfFileAttachmentAnnot
public class PdfFileAttachmentAnnot
This class represents a file attachment annotation. A file attachment annotation is used to attach external files to the PDF document. Users can extract the attachments from the document usng a viewer application.
// Create a PDF page PdfPage page = new PdfPage(); // Create a PDF font PdfFont fontHelvetica = PdfFont.create("Helvetica", 15, PdfEncodings.WINANSI); fontHelvetica.setColor(Color.BLUE); p.writeText("FileAttachment Annotation", font_Helvetica, 220, 400); // Create a file attachment annotation and set its properties PdfFileAttachmentAnnot fileAttachAnnot = new PdfFileAttachmentAnnot( 2, 4, PdfFileAttachmentAnnot.ANNOT_TYPE_FILE_ATTACHMENT, Color.CYAN); fileAttachAnnot.setFilePath("C:\\somefile”); fileAttachAnnot.setBorderStyle(PdfAnnot.ANNOT_TYPE_CIRCLE); fileAttachAnnot.setBorderWidth(2); fileAttachAnnot.setTitle("FileText Annotation Title 1"); fileAttachAnnot.setSubject("FileText Annotation Subject 1"); // Add the annotation to the page page.addAnnotation(fileAttachAnnot);
| Field Summary | |
|---|---|
static int |
ICON_GRAPH
|
static int |
ICON_PAPERCLIP
|
static int |
ICON_PUSHPIN
|
static int |
ICON_TAG
|
| Constructor Summary | |
|---|---|
PdfFileAttachmentAnnot()
|
|
PdfFileAttachmentAnnot(double x,
double y,
Color c)
|
|
PdfFileAttachmentAnnot(double x,
double y,
int flags)
|
|
PdfFileAttachmentAnnot(double x,
double y,
int flags,
Color c)
|
|
PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title)
|
|
PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
Color c)
|
|
PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags)
|
|
PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags,
Color c)
|
|
PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags,
Color c,
String filePath,
boolean isUrl,
boolean isVolatile,
int icon)
|
|
PdfFileAttachmentAnnot(String filePath,
boolean isUrl,
boolean isVolatile,
int icon)
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
PdfAppearanceStream |
getDownAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
String |
getFilePath()
|
int |
getIcon()
|
PdfAppearanceStream |
getNormalAppearance()
Returns the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
PdfPopUpAnnot |
getPopup()
Returns a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
PdfAppearanceStream |
getRolloverAppearance()
Returns the appearance stream that needs to be used by a viewer application to display the annotation when the user places the mouse pointer over the annotation (and does not hold down the mouse button). |
void |
setDownAppearance(PdfAppearanceStream downAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field and holds down the mouse button. |
void |
setFilePath(String filePath)
|
void |
setIcon(int icon)
|
void |
setNormalAppearance(PdfAppearanceStream normalAppearance)
Specifies the default appearance stream that needs to be used by a viewer application to display the annotation/form field (that is, when the user is not interacting with the annotation/form field). |
void |
setPopup(PdfPopUpAnnot popup,
boolean overridePopUpProperties)
Specifies a popup annotation that needs to be used by a viewer application to display the popup window for this annotation. |
void |
setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
Specifies the appearance stream that needs to be used by a viewer application to display the annotation/form field when the user places the mouse pointer over the annotation/form field (and does not hold down the mouse button). |
| Methods inherited from class com.gnostice.pdfone.PdfAnnot |
|---|
getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, getType, hashCode, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ICON_GRAPH
public static final int ICON_PAPERCLIP
public static final int ICON_PUSHPIN
public static final int ICON_TAG
| Constructor Detail |
|---|
public PdfFileAttachmentAnnot()
public PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags,
Color c,
String filePath,
boolean isUrl,
boolean isVolatile,
int icon)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
Color c)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
String subject,
String contents,
String title,
int flags,
Color c)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
int flags)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
int flags,
Color c)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(double x,
double y,
Color c)
throws IOException,
PdfException
IOException
PdfException
public PdfFileAttachmentAnnot(String filePath,
boolean isUrl,
boolean isVolatile,
int icon)
| Method Detail |
|---|
public Object clone()
public String getFilePath()
public void setFilePath(String filePath)
public int getIcon()
public void setIcon(int icon)
public PdfPopUpAnnot getPopup()
public void setPopup(PdfPopUpAnnot popup,
boolean overridePopUpProperties)
popup - popup annotation that needs to be used as the popup
windowoverridePopUpProperties - whether a viewer application should override the
properties of the popup annotation with those of
this annotationgetPopup()public PdfAppearanceStream getDownAppearance()
getNormalAppearance(),
getDownAppearance(),
setNormalAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream)public void setDownAppearance(PdfAppearanceStream downAppearance)
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance(),
setNormalAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public PdfAppearanceStream getNormalAppearance()
getDownAppearance(),
getRolloverAppearance(),
setNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public void setNormalAppearance(PdfAppearanceStream normalAppearance)
normalAppearance - the specified appearance streamsetDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream),
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance()public PdfAppearanceStream getRolloverAppearance()
getNormalAppearance(),
getDownAppearance(),
setNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
setRolloverAppearance(PdfAppearanceStream)public void setRolloverAppearance(PdfAppearanceStream rolloverAppearance)
rolloverAppearance - the specified appearance streamsetNormalAppearance(PdfAppearanceStream),
setDownAppearance(PdfAppearanceStream),
getNormalAppearance(),
getDownAppearance(),
getRolloverAppearance()
|
Std. Ed. v2.10 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||