Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PDFCreator 0.9.2 automation with VFP
Message
From
16/07/2006 18:24:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
PDFCreator 0.9.2 automation with VFP
Miscellaneous
Thread ID:
01136827
Message ID:
01136827
Views:
496
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
Next
Reply
Map
View

Click here to load this message in the networking platform