FileAttachment Class Documentation

classFileAttachment

Namespace:com::datalogics::PDFL

Detailed Description

A file attachment.Any file can be attached to the PDF document. The class allows to create attachment and manipulate by its content.

Constructor & Destructor Documentation

FileAttachment

FileAttachment(Documentdoc, StringfileName)

Parameters

doc: Document

The PDF document (reference).

fileName: String

The path to file which will be attached to the document.

Allows to add attachment into the PDF document.

FileAttachment

FileAttachment(Documentdoc, StringfileName, StringkeyName)

Parameters

doc: Document

The PDF document (reference).

fileName: String

The path to file which will be attached to the document.

keyName: String

The name of the key.

Allows to add attachment into the PDF document using the specified key name.

Member Function Documentation

DisposeChildren

voidDisposeChildren()

Returns:

void

[static initializer]

static void[static initializer]()

delete

synchronized voiddelete(Booleandisposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized voiddelete()

Returns:

synchronized void

finalize

voidfinalize()

Returns:

void

getAFRelationship

AFRelationshipgetAFRelationship()

Returns:

The attachment's Associated File relationship.

Gets the attachment's Associated File relationship.

getCollectionItemNumber

floatgetCollectionItemNumber(CollectionSchemaFieldcollectionField)

Parameters

collectionField: CollectionSchemaField

the field for which item value should be retrieved.

Returns:

collection items value

GetCollectionItemNumber allows to obtain collection item according to the specified schema field.

getCollectionItemString

StringgetCollectionItemString(CollectionSchemaFieldcollectionField)

Parameters

collectionField: CollectionSchemaField

the field for which item value should be retrieved.

Returns:

collection items value

GetCollectionItemString allows to obtain collection item value according to the specified schema field.

getFileName

StringgetFileName()

Returns:

The attachment's file name.

Allow to obtain attachment's file name.

getFileSize

longgetFileSize()

Returns:

The attachment's size in bytes.

Allows to obtain attachment's size.

saveToFile

voidsaveToFile(StringfileName)

Parameters

fileName: String

The path where attachment will be saved.

Returns:

void

Allows to save attachment to the specified file.

saveToStream

voidsaveToStream(javax.imageio.stream.ImageOutputStreamstream)

Parameters

stream: javax.imageio.stream.ImageOutputStream

The stream from which to save the FileAttachment.

Returns:

void

Saves a FileAttachment to a javax.imageio.stream.ImageInputStream.

setAFRelationship

voidsetAFRelationship(AFRelationshiprelationship)

Parameters

relationship: AFRelationship

Returns:

The attachment's Associated File relationship.

Sets the attachment's Associated File relationship.

setCollectionItemNumber

voidsetCollectionItemNumber(CollectionSchemaFieldcollectionField, floatvalue)

Parameters

collectionField: CollectionSchemaField

schema field which contains information about data type. The parameter's subtype should be a Number.

value: float

the item's value.

Returns:

void

SetCollectionItemNumber allows to add key to the collection item dictionary.

setCollectionItemString

voidsetCollectionItemString(CollectionSchemaFieldcollectionField, Stringvalue)

Parameters

collectionField: CollectionSchemaField

schema field which contains information about data type. The parameter's subtype should be a Text.

value: String

the item's value.

Returns:

void

SetCollectionItemString allows to add key to the collection item dictionary.

updateFromFile

voidupdateFromFile(StringfileName)

Parameters

fileName: String

The path to the file from which attachment will be updated.

Returns:

void

Allows to update attachment from another file.