FileAttachment Class Documentation

class FileAttachment

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(Document doc, String fileName)

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(Document doc, String fileName, String keyName)

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

delete

synchronized void delete(Boolean disposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized void delete()

Returns:

synchronized void

finalize

void finalize()

Returns:

void

getAFRelationship

AFRelationship getAFRelationship()

Returns:

AFRelationship

The attachment's Associated File relationship.

Gets the attachment's Associated File relationship.

getCollectionItemNumber

float getCollectionItemNumber(CollectionSchemaField collectionField)

Parameters

collectionField: CollectionSchemaField

the field for which item value should be retrieved.

Returns:

float

collection items value

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

getCollectionItemString

String getCollectionItemString(CollectionSchemaField collectionField)

Parameters

collectionField: CollectionSchemaField

the field for which item value should be retrieved.

Returns:

String

collection items value

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

getFileName

String getFileName()

Returns:

String

The attachment's file name.

Gets the attachment's file name.

getFileSize

long getFileSize()

Returns:

long

The attachment's size in bytes.

Gets the attachment's file size.

saveToFile

void saveToFile(String fileName)

Parameters

fileName: String

The path where attachment will be saved.

Returns:

void

Allows to save attachment to the specified file.

saveToStream

void saveToStream(javax.imageio.stream.ImageOutputStream stream)

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

void setAFRelationship(AFRelationship relationship)

Parameters

relationship: AFRelationship

The Associated File relationship to set.

Returns:

void

Sets the attachment's Associated File relationship.

setCollectionItemNumber

void setCollectionItemNumber(CollectionSchemaField collectionField, float value)

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

void setCollectionItemString(CollectionSchemaField collectionField, String value)

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

void updateFromFile(String fileName)

Parameters

fileName: String

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

Returns:

void

Allows to update attachment from another file.