Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PDFCreator 0.9.2 automation with VFP
Message
De
16/07/2006 18:24:56
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
PDFCreator 0.9.2 automation with VFP
Divers
Thread ID:
01136827
Message ID:
01136827
Vues:
497
Hi all,

Anyone have success with automating the PDFCreator COM object with VFP, I have the code above, the printing windows appear but no file created, any help is apreciated, this sample is only to convert a simple file, but the idea is to print VFP Reports, in .PDF or .TIF for faxing.
* PDFCreator
cOptions=.NULL.
oPdfCreator=.NULL.

oPdfCreator=CREATEOBJECT("PDFCreator.clsPDFCreator")
oOptions   =CREATEOBJECT("PDFCreator.clsPDFCreatorOptions")


WITH oPdfCreator
	cOptions=.cOptions
        cVisible=.T.
ENDWITH

WITH oOptions
  .AutosaveDirectory = "C:\1"
  .AutosaveFilename = "JOAO"
  .UseAutosave = 1
  .UseAutosaveDirectory = 1
  .AutosaveFormat = 0 && PDF
ENDWITH

SET PRINTER TO NAME "PDFCreator"

WITH oPdfCreator
	.cDefaultPrinter = "PDFCreator"
	.cClearCache()
	.cPrinterStop = .F.
	.cStart()
	.cPrintFile("c:\readme.txt")

	.cPrinterStop = .T.
	.cClose
	
ENDWITH
João Batista
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform