/
SaveAttachment() method of pdfreader cause error "Invalid path or file name". 

SaveAttachment() method of pdfreader cause error "Invalid path or file name". 

KB-20250217-01

Version

XFRX 21.1

Symptoms

VFP show error  "Invalid path or file name".

Cause

File specification string contain full or relative path.

Workaround

Remove path from file name.

LOCAL ARRAY m.laATTACH(1), m.lii, m.liCount
m.liCount=m.loPDFR.GetListAttachments(@m.laATTACH, "*.*")

FOR m.lii=1 TO m.liCount
    laATTACH(m.lii, 2)=JUSTFNAME(m.laATTACH(m.lii, 2))
NEXT

m.loPDFR.SaveAttachments(@m.laATTACH, "c:\temp\xx\")