public class FileAttachment extends Markup
Annot.BorderStyle| Modifier and Type | Field and Description |
|---|---|
static int |
e_Graph
For each FileAttachment annotation, one can specify the icon
used to display the annotation by choosing one of the entries
the following integer list.
|
static int |
e_Paperclip
The Constant e_Paperclip.
|
static int |
e_PushPin
The Constant e_PushPin.
|
static int |
e_Tag
The Constant e_Tag.
|
static int |
e_Unknown
The Constant e_Unknown.
|
e_3D, e_Caret, e_Circle, e_down, e_FileAttachment, e_FreeText, e_hidden, e_Highlight, e_Ink, e_invisible, e_Line, e_Link, e_locked, e_locked_contents, e_Movie, e_no_rotate, e_no_view, e_no_zoom, e_normal, e_Polygon, e_Polyline, e_Popup, e_print, e_PrinterMark, e_Projection, e_read_only, e_Redact, e_RichMedia, e_rollover, e_Screen, e_Sound, e_Square, e_Squiggly, e_Stamp, e_StrikeOut, e_Text, e_toggle_no_view, e_TrapNet, e_Underline, e_Watermark, e_Widget| Constructor and Description |
|---|
FileAttachment()
Creates an empty FileAttachment annotation.
|
FileAttachment(Annot annot)
Creates an FileAttachment annotation and initialize it using given annotation object.
|
FileAttachment(Obj d)
Creates an FileAttachment annotation and initialize it using given Cos/SDF object.
|
| Modifier and Type | Method and Description |
|---|---|
static FileAttachment |
create(Doc doc,
Rect pos,
java.lang.String path)
Creates a file attachment annotation.
|
static FileAttachment |
create(Doc doc,
Rect pos,
java.lang.String path,
java.lang.String icon_name)
Creates FileAttachment
|
void |
export()
The function saves the data referenced by this File Attachment to an
external file.
|
void |
export(java.lang.String save_as)
The function saves the data referenced by this File Attachment to an
external file.
|
FileSpec |
getFileSpec()
Get the file specification.
|
int |
getIcon()
Get the icon type as an entry of the enum "Icon".
|
java.lang.String |
getIconName()
Get the icon type as a string.
|
void |
SetFileSpec(FileSpec file)
Set the file specification.
|
void |
setIcon(int type)
Set the icon type using an entry of the enum "Icon".
|
void |
SetIconName(java.lang.String icon)
Set the icon type using a string.
|
getBorderEffect, getBorderEffectIntensity, getContentRect, getCreationDates, getInteriorColor, getInteriorColorCompNum, getOpacity, getPadding, getPopup, getSubject, getTitle, setBorderEffect, SetBorderEffectIntensity, setContentRect, setCreationDates, setInteriorColor, setOpacity, SetPadding, setPopup, setSubject, setTitle__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getSDFObj, GetStructParent, getType, getUniqueID, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setStructParent, setUniqueIDpublic static final int e_Graph
public static final int e_PushPin
public static final int e_Paperclip
public static final int e_Tag
public static final int e_Unknown
public FileAttachment(Obj d)
d - the input Cos/SDF objectpublic FileAttachment()
public FileAttachment(Annot annot) throws PDFNetException
annot - input annotation objectPDFNetExceptionpublic static FileAttachment create(Doc doc, Rect pos, java.lang.String path, java.lang.String icon_name) throws PDFNetException
doc - A document to which the annotation is added.pos - A rectangle specifying the annotation's bounds, in user space coordinates.path - path to the referenced fileicon_name - the The name of an icon to be used in displaying the annotation, default is PushPin.PDFNetExceptionpublic static FileAttachment create(Doc doc, Rect pos, java.lang.String path) throws PDFNetException
doc - A document to which the annotation is added.pos - A rectangle specifying the annotation's bounds, specified in
user space coordinates.path - the pathPDFNetExceptionpublic void export(java.lang.String save_as)
throws PDFNetException
save_as - An optional parameter indicating the filepath and filename
where the data should be saved. If this parameter is not specified the function
will attempt to save the file using FileSpec.GetFilePath().PDFNetExceptionpublic void export()
throws PDFNetException
PDFNetExceptionpublic FileSpec getFileSpec() throws PDFNetException
PDFNetExceptionpublic void SetFileSpec(FileSpec file) throws PDFNetException
file - The file associated with this annotation.PDFNetExceptionpublic int getIcon()
throws PDFNetException
PDFNetExceptionpublic void setIcon(int type)
throws PDFNetException
type - The enum "Icon" entry associated with this FileAttachment annotation.PDFNetExceptionpublic java.lang.String getIconName()
throws PDFNetException
PDFNetExceptionpublic void SetIconName(java.lang.String icon)
throws PDFNetException
icon - The string specifying the icon type associated with this
FileAttachment annotation.PDFNetException