Foxit::PDF::Attachment Class Reference

Class to represent PDF attachment. More...

Public Member Functions

 Attachment ()
 Default constructor.
 
String^ GetFileName ()
 Get the file name. More...
 
String^ GetDescription ()
 Get the description information. More...
 
Int64 GetSize ()
 Get the size. More...
 
DateTimeGetCreationDateTime ()
 Get the creation date and time. More...
 
DateTimeGetModifiedDateTime ()
 Get the date and time of last modification. More...
 
array< unsigned char >^ GetData (Boolean isRawData)
 Get the attachment data. More...
 
void SetDescription (String^ description)
 Set the description. More...
 

Properties

Int64 pointer
 Pointer to a handle of PDF attachment object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF attachment object directly.
 

Detailed Description

Class to represent PDF attachment.

Member Function Documentation

DateTime ^ Foxit::PDF::Attachment::GetCreationDateTime ( )

Get the creation date and time.

Returns
A Foxit::DateTime object that receives creation date and time. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Format means the creation date and time of current attachment has a wrong format.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
array<unsigned char> ^ Foxit::PDF::Attachment::GetData ( Boolean  isRawData)

Get the attachment data.

Parameters
[in]isRawDataA Boolean value that indicates whether to get raw data or decoded data: true means to get raw data, and false means to get decoded data (original data).
Returns
An IBuffer object that receives the data of current attachment. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
String ^ Foxit::PDF::Attachment::GetDescription ( )

Get the description information.

Description information is a descriptive text associated with the attachment. It is used for files in the EmbeddedFiles name tree.

Returns
A String object that receives the description. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is not enough memory or if the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
String ^ Foxit::PDF::Attachment::GetFileName ( )

Get the file name.

Returns
A String object that receives the file name. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is not enough memory or if the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
DateTime ^ Foxit::PDF::Attachment::GetModifiedDateTime ( )

Get the date and time of last modification.

Returns
A Foxit::DateTime object that receives the last modification date and time. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Format means last modification date and time of current attachment has a wrong format.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
Int64 Foxit::PDF::Attachment::GetSize ( )

Get the size.

The size of an embedded attachment is in bytes.

Returns
The size. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
void Foxit::PDF::Attachment::SetDescription ( String^  description)

Set the description.

Description information is a descriptive text associated with the attachment. It is used for files in the EmbeddedFiles name tree.

Parameters
[in]descriptionA String object that specifies the new description context.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param parameter description is nullptr.
ErrorCode::OutOfMemory means there is not enough memory or if the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Foxit Corporation