Save attachment to file.
XFRX version: 19.0
| Code Block |
|---|
Object.SaveAttachment(lcID, lcFileName) |
Parameters
lcID
Specifies the id of attachment.
lcFileName
Specifies the file name for saving to a file.
Return value
Boolean
Return.T. if attachment save to file, .F. or not.
Remarks
Applies To: PDF#READER
Examples
| Code Block |
|---|
m.loPDFR = EVALUATE([xfrx("PDF#READER")])
*m.loPDFR.SetPasswords("owner","user") && set password for pdf file
m.lcFile="BASE-UNI.pdf"
IF m.loPDFR.openDocument(m.lcFile) < 0
RETURN
ENDIF
m.lnError=m.loPDFR.ReadDocument()
LOCAL ARRAY laATTACH(1)
m.liAttachs=m.loPDFR.GetListAttachments(@m.laATTACH)
m.loPDFR.SaveAttachment(m.laATTACH(1,1), "c:\temp\xx\"+m.laATTACH(1, 2))
m.loPDFR.closeDocument() |
...