FileAttachment Class Documentation
class FileAttachment : SystemIDisposableNamespace: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
Uses types
Constructor & Destructor Documentation
FileAttachment
FileAttachment(Document doc, string fileName)Parameters
doc: DocumentThe PDF document (reference).
fileName: stringThe 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: DocumentThe PDF document (reference).
fileName: stringThe path to file which will be attached to the document.
keyName: stringThe 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:
voidGetCollectionItemNumber
float GetCollectionItemNumber(CollectionSchemaField collectionField)Parameters
collectionField: CollectionSchemaFieldthe field for which item value should be retrieved.
Returns:
floatcollection items value
GetCollectionItemNumber allows to obtain collection item according to the specified schema field.
GetCollectionItemString
string GetCollectionItemString(CollectionSchemaField collectionField)Parameters
collectionField: CollectionSchemaFieldthe field for which item value should be retrieved.
Returns:
stringcollection items value
GetCollectionItemString allows to obtain collection item value according to the specified schema field.
SaveToFile
void SaveToFile(string fileName)Parameters
fileName: stringThe path where attachment will be saved.
Returns:
voidAllows to save attachment to the specified file.
SaveToStream
void SaveToStream(System.IO.Stream stream)Parameters
stream: System.IO.StreamThe Stream to which the FileAttachment is saved.
Returns:
voidSaves a FileAttachment to a Stream.
SetCollectionItemNumber
void SetCollectionItemNumber(CollectionSchemaField collectionField, float value)Parameters
collectionField: CollectionSchemaFieldschema field which contains information about data type. The parameter's subtype should be a Number.
value: floatthe item's value.
Returns:
voidSetCollectionItemNumber 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: CollectionSchemaFieldschema field which contains information about data type. The parameter's subtype should be a Text.
value: stringthe item's value.
Returns:
voidSetCollectionItemString 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: stringThe path to the file from which attachment will be updated.
Returns:
voidAllows to update attachment from another file.