Get Attachment Information
Contents
[
Hide
]As mentioned in Get Attachments from a PDF Document, attachment information is held in the FileSpecification object, gathered with other attachments in the Document object’s EmbeddedFiles collection.
The FileSpecification object provides methods that get information about the attachment, for example:
- getName() – gets the file name.
- getDescription() – gets the file description.
- getMIMEType() – gets the file’s MIME type.
- getParams() – information about the file parameters, for example CheckSum, CreationDate, ModDate and Size.
To get these parameters, first make sure that the getParams() method does not return null.
Either loop through all of the attachments in the EmbeddedFiles collection using for loop, or get an individual attachment by specifying its index value. The following code snippet shows how to get information about a specific attachment.