Class Index

Classes


Class PDFNet.FileAttachmentAnnot

PDFNet.FileAttachmentAnnot

Class Summary
Constructor Attributes Constructor Name and Description
 
A file attachment annotation contains a reference to a file, which may be embedded in the PDF document.
Method Summary
Method Attributes Method Name and Description
<static>  
PDFNet.FileAttachmentAnnot.createDefault(doc, pos, path)
[Documentation Not Yet Added]
 
[Documentation Not Yet Added]
<static>  
PDFNet.FileAttachmentAnnot.createFromObj(d)
creates an FileAttachment annotation and initializes it using given Cos/SDF object.
<static>  
PDFNet.FileAttachmentAnnot.createWithFileSpec(doc, pos, fs, icon_name)
Creates a file attachment annotation.
 
export(save_as)
The function saves the data referenced by this File Attachment to an external file.
 
 
 
Returns the name of the icon associated with the FileAttachment annotation.
 
sets the file specification.
 
setIcon(type)
sets the icon style associated with FileAttachment annotation.
 
setIconName(iname)
sets the name of the icon associated with the FileAttachment annotation.
Class Detail
PDFNet.FileAttachmentAnnot(id)
A file attachment annotation contains a reference to a file, which may be embedded in the PDF document.
Parameters:
id
Method Detail
<static> {FileAttachmentAnnot} PDFNet.FileAttachmentAnnot.createDefault(doc, pos, path)
[Documentation Not Yet Added]
Parameters:
{SDFDoc} doc
(generated documentation)
{rect} pos
(generated documentation)
{string} path
(generated documentation)
Returns:
{FileAttachmentAnnot} A promise that resolves to an object of type: "FileAttachmentAnnot" (generated documentation)

{Annot} createFromAnnot()
[Documentation Not Yet Added]
Returns:
{Annot} A promise that resolves to an object of type: "Annot" (generated documentation)

<static> {FileAttachmentAnnot} PDFNet.FileAttachmentAnnot.createFromObj(d)
creates an FileAttachment annotation and initializes it using given Cos/SDF object. d Cos/SDF object used to initialize the FileAttachment annotation
Parameters:
{Obj} d
The Cos/SDF object to initialze the annotation with.
Returns:
{FileAttachmentAnnot} A promise that resolves to an object of type: "FileAttachmentAnnot" (generated documentation)

<static> {FileAttachmentAnnot} PDFNet.FileAttachmentAnnot.createWithFileSpec(doc, pos, fs, icon_name)
Creates a file attachment annotation. A file attachment annotation contains a reference to a file, which typically is embedded in the PDF file.
Parameters:
{SDFDoc} doc
A document to which the annotation is added.
{rect} pos
A rectangle specifying the annotation's bounds, in user space coordinates.
{FileSpec} fs
a file specification object used to initialize the file attachment annotation.
{number} icon_name
The name of an icon to be used in displaying the annotation, default is PushPin.
Returns:
{FileAttachmentAnnot} A promise that resolves to a new file attachment annotation.

{boolean} export(save_as)
The function saves the data referenced by this File Attachment to an external file. If the file is embedded, the function saves the embedded file. If the file is not embedded, the function will copy the external file. If the file is not embedded and the external file can't be found, the function returns false.
Parameters:
{string} 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().
Returns:
{boolean} A promise that resolves to true is the file was saved successfully, false otherwise.

{FileSpec} getFileSpec()
Returns:
{FileSpec} A promise that resolves to the file specification that contains a file reference or the embedded file data stream.

{number} getIcon()
Return value enum:
PDFNet.FileAttachmentAnnot.Icon = {
	e_Graph : 0
	e_PushPin : 1
	e_Paperclip : 2
	e_Tag : 3
	e_Unknown : 4
}
Returns:
{number} A promise that resolves to the type the associated icon style.

{string} getIconName()
Returns the name of the icon associated with the FileAttachment annotation.
Returns:
{string} A promise that resolves to a string denoting the name of the icon.
See:
GetIcon() GetIconName() returns the icon name as it appears in the annotation dictionary, while GetIcon() returns the same icon name converted to enumeration value.

setFileSpec(file)
sets the file specification.
Parameters:
{FileSpec} file
The file specification to associate with this annotation.. The file specification contains a file reference or the embedded file data stream.

setIcon(type)
sets the icon style associated with FileAttachment annotation. (Optional)
Parameters:
{number} type
icon style.

setIconName(iname)
sets the name of the icon associated with the FileAttachment annotation. (Optional)
Parameters:
{string} iname
A string.denoting the name of the icon.
See:
SetIcon()

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:39 GMT-0700 (PDT)