ExtractAllAttachments
PowerScript function
Description
Extract all attachments from the PDF document to a folder.
Applies to
PDFDocExtractor object in Objects and Controls
Syntax
|
1 |
long ExtractAllAttachments(string destFilePath) |
|
Argument |
Description |
|---|---|
|
destFilePath |
The path to save the attachment(s). The path will be auto |
Return value
Long. Returns 1 if it succeeds and -1 if it fails. For more errors,
see the Error Codes.
Examples
This example extracts all the attachments of “extract.pdf” into the
“D:Save” folder. The folder will be auto created if it does not exist in
the current directory yet:
|
1 2 3 4 5 6 |
long ll_open PDFDocExtractor lpdf_docExt lpdf_docExt = create PDFDocExtractor ll_open = lpdf_docExt.open("D:extract.pdf" ) lpdf_docExt.extractallattachments("D:file" ) lpdf_docExt.close() |
This example extracts all the attachments of “extract.pdf” and save
into the “file” folder in the same directory. . The folder will be auto
created if it does not exist in the current directory yet:
|
1 2 3 4 5 6 7 |
PDFDocExtractor lpdf_docExt lpdf_docExt = create PDFDocExtractor ll_open = lpdf_docExt.open("extract.pdf" ) //Extract all attachments. The "file" folder will be created if it does not exist in the current directoy lpdf_docExt.extractallattachments("file" ) lpdf_docExt.close() |
See also