SELECT Customers * find the record you want to export PDF from ... COPY TO temp FIELDS custfile NEXT 1 lcPdfFileName = "cust_hist.pdf" lcStr = FILETOSTR("temp.fpt") lnStartPos = AT( "%PDF", lcStr) lnEndPos = RAT( "%%EOF", lcStr) + 5 lcPdfStr = SUBS(lcStr, lnStartPos, lnEndPos - lnStartPos + 1 ) STRTOFILE(lcPdfStr, lcPdfFileName)>
>handleout=FCREATE(tcFileName) > >lnStartPos = AT( "%PDF", str1 ) >lnEndPos = RAT( "%%EOF", str1 ) + 5 > > >str2=SUBS(str1, lnStartPos, lnEndPos - lnStartPos ) > >*** Write "Str2" into the BMP file "Test.BMP" >n=FWRITE(handleout,str2) >>