FileAttachment Class Documentation

class FileAttachment : SystemIDisposable

Namespace:Datalogics::PDFL

Inherits from:
SystemIDisposable

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.

Referenced by

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.

Property Documentation

AFRelationship

AFRelationship AFRelationship[get, set]

Gets the attachment's Associated File relationship.

FileName

string FileName[get]

Gets the attachment's file name.

FileSize

uint FileSize[get]

Gets the attachment's file size.

Member Function Documentation

Dispose

void Dispose()

Returns:

void

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.

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(System.IO.Stream stream)

Parameters

stream: System.IO.Stream

The Stream to which the FileAttachment is saved.

Returns:

void

Saves a FileAttachment to a Stream.

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.

Exceptions

bad
—

parameter exception if CollectionSchema doesn't contain specified field.

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.

Exceptions

bad
—

parameter exception if CollectionSchema doesn't contain specified field.

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.