FileAttachment Class Documentation
class FileAttachmentNamespace:datalogics_interface
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.
Uses types
Constructor & Destructor Documentation
FileAttachment
FileAttachment(Document & doc, const std::string & file_name)Parameters
doc: Document &The PDF document (reference).
file_name: const std::string &The path to file which will be attached to the document.
Allows to add attachment into the PDF document.
FileAttachment
FileAttachment(Document & doc, const std::string & file_name, const std::string & key_name)Parameters
doc: Document &The PDF document (reference).
file_name: const std::string &The path to file which will be attached to the document.
key_name: const std::string &
Allows to add attachment into the PDF document.
FileAttachment
FileAttachment(FileAttachment && )Parameters
~FileAttachment
~FileAttachment()Member Function Documentation
get_af_relationship
AFRelationship get_af_relationship()Returns:
AFRelationshipThe attachment's Associated File relationship.
Gets the attachment's Associated File relationship.
get_file_name
std::string get_file_name()Returns:
std::stringThe attachment's file name.
Gets the attachment's file name.
get_file_size
size_t get_file_size()Returns:
size_tThe attachment's size in bytes.
Gets the attachment's file size.
operator=
FileAttachment & operator=(FileAttachment && )Parameters
Returns:
FileAttachment &save_to_file
void save_to_file(const std::string & file_name)Parameters
file_name: const std::string &The path where attachment will be saved.
Returns:
voidAllows to save attachment to the specified file.
set_af_relationship
void set_af_relationship(AFRelationship relationship)Parameters
relationship: AFRelationshipThe Associated File relationship to set.
Returns:
voidSets the attachment's Associated File relationship.
update_from_file
void update_from_file(const std::string & file_name)Parameters
file_name: const std::string &The path to the file from which attachment will be updated.
Returns:
voidAllows to update attachment from another file.