Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save PDF file in General Field to c:\ drive
Message
 
 
To
29/09/2006 13:36:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01158204
Message ID:
01158233
Views:
32
This message has been marked as the solution to the initial question of the thread.
Something like (not tested)
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)
>
>Should I use this code
>
>
>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)
>
>
>If yes, how can I use the above code with
>
>Lets say table name is Customers
>General field name is custfile
>and Pdf file in custfile is cust_hist.pdf
>
>Thanks
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform