Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save PDF file in General Field to c:\ drive
Message
 
 
À
29/09/2006 13:36:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01158204
Message ID:
01158233
Vues:
33
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform