Description
Extract an attachment from the PDF document.
Applies to
Syntax
long ExtractAttachmentFile(string attachmentFilePath, string destFilePath)
Argument |
Description |
---|---|
attachmentFile |
The file name of the attachment in the PDF document. |
destFilePath |
The path and file name to save the attachment as. |
Return value
Long. Returns 1 if it succeeds and -1 if it fails. For more errors, see the Error Codes.
Examples
This example extracts the attachment file "testimage.png" of "extract.pdf" and saves it as "D:\file3\testimage1.png". The folder "D:\file3" will be auto created if it does not exist yet:
long ll_open,ll_return PDFDocExtractor lpdf_docExt lpdf_docExt = create PDFDocExtractor ll_open = lpdf_docExt.open("extract.pdf" ) ll_return = lpdf_docExt.extractattachmentfile("testimage.png","D:\file3\testimage1.png" ) lpdf_docExt.close()
See also