GetAttachmentList
PowerScript function
Description
Get the list of attachments in the PDF document.
Applies to
PDFDocExtractor object in Objects and Controls
Syntax
|
1 |
long GetAttachmentList(ref string attachments[]) |
|
Argument |
Description |
|---|---|
|
attachments[] |
The array of all the attached files in the PDF document. |
Return value
Long. Returns 1 if it succeeds and -1 if it fails. For more errors,
see the Error Codes.
Examples
This example gets the list of attachments of “extract.pdf” and saves
it as attachments[]:
|
1 2 |
ll_open = lpdf_docExt.open("extract.pdf" ) lpdf_docExt.GetAttachmentList(ref string attachments[]) |
This example gets the list of attachments of “extract.pdf” and then
extract the attachment file one by one:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
long ll_open,ll_return,li_i string ls_list[] PDFDocExtractor lpdf_docExt lpdf_docExt = create PDFDocExtractor ll_open = lpdf_docExt.open("D:extract.pdf" ) //ls_list has the names of all the attachment files ll_return = lpdf_docExt.getattachmentlist(ref ls_list) if ll_return >0 then for li_i = 1 to upperbound(ls_list) //Extracts the attachment files ll_return = lpdf_docExt.extractattachmentfile(ls_list[li_i],"D:file4"+ls_list[li_i] ) next end if lpdf_docExt.close() |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest