Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generate PDF Files Automatically.
Message
 
 
À
11/07/2000 16:34:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00390104
Message ID:
00390947
Vues:
57
>>>>Hi Mark: Could you show me your VFP code that is using this PDF driver?
>>>>
>>>>
>>>>Thanks, Tai Fei Pao
>>>>
>>>>
>>>>>>Dear all,
>>>>>>
>>>>>>I have a big problem! I wrote a VF program to port the data into a Excel file. Now, I need to print that file into PDF and attach into mail to send for customer. How can I do that? I have solved the mail problem but the PDF generation that make me ache. I found that many post talk about PDF as before but those post also talk to print the PDF on VFP. How can I integrate all together? Thank you for any advise.
>>>>>>
>>>>>>Best Regards,
>>>>>>
>>>>>>Justy Chow
>>>>>
>>>>>Check www.amyuni.com.
>>>>>MArk
>>>Here you go:
>>
>>
>>>LPARAMETERS tcFileName
>>>This.poPDFPrinter = CREATEOBJECT('CDIntf.CDIntf')
>>>*!* check if PDF driver is installed on that computer
>>>=APRINTERS(arr)
>>>IF ASCAN(arr, 'pdfprinter') > 0 && installed
>>> *!* attach to the existing diver
>>> This.poPDFPrinter.DriverInit('pdfprinter')
>>>ELSE
>>> *!* initiate printer driver named "pdfprinter". This.poPDFPrinter.PDFDriverInit('pdfprinter')
>>>ENDIF
>>>This.poPDFPrinter.Resolution = 1200 && set resolution
>>>This.poPDFPrinter.SetDefaultConfig() && set default configuration for all applications
>>>SET PRINTER TO NAME "pdfprinter"
>>>This.poPDFPrinter.DefaultFileName = tcFileName && set default file name
>>>This.poPDFPrinter.FileNameOptions = 1 + 2 + 32 && set options: No Prompt, use default file name, broadcast messages
>>>
>>What is this? What is poPDFPrinter? And what is the name of method, you showed us?
>>
>>>My classlib is Web, classname is cusPdf
>>>Here is code from a calling class:
>>>oPdfPrinter = NewObject('cusPdf', 'web')
>>>oPdfPrinter.mCreateDriver('fullfilepath')
>>>
>>>After that any
>>>REPORT FORM reportname TO PRINTER
>>>will actually create a PDF file with 'fullfilepath' name and location
>>>
>>>Mark
>Do you mean an empty message?
>Mark

Not really. I emphasize my original question in blue color... :)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform