I'm using VFP 9 SP 1 and PDFCreator 0.9.3 to create a program to print many html files to one pdf file.
All is working correctly except that each time I sent an html file to print, the printer dialog is displayed (incorrect behaviour).
If I do the same with txt files, the print dialog isn't showed (this is the correct behaviour).
Someone could help me to solve this?
Local loPDFCreator As PDFCreator.clsPDFCreator
loPDFCreator = Createobject("PDFCreator.clsPDFCreator")
If loPDFCreator.cStart("/NoProcessingAtStartup")
With loPDFCreator
Local loOptions As PDFCreator.clsPDFCreatorOptions
loOptions = loPDFCreator.cOptions
With loOptions
.PrinterStop = .T.
.UseAutosave = 1
.UseAutosaveDirectory = 1
.AutosaveDirectory = "C:\temp"
.AutosaveFilename = "teste.pdf"
Endwith
loPDFCreator.cOptions = loOptions
.cDefaultPrinter = "PDFCreator"
.cClearCache()
Local loEventHandler
loEventHandler = Createobject("PDFCreatorStatus")
Eventhandler(loPDFCreator,loEventHandler)
Local lnFile
For lnFile=1 To 2
.cPrintfile(Getfile())
Inkey(1)
Endfor
Inkey(1)
.cCombineAll
Do While (.cCountOfPrintjobs <> 1)
Inkey(1)
Enddo
.cPrinterStop = .F.
Endwith
With loEventHandler
.ReadyState = 0
Do While (.ReadyState = 0)
Inkey(1)
Enddo
Endwith
Eventhandler(loPDFCreator,loEventHandler,.T.)
loEventHandler = Null
Endif
loPDFCreator.cClose()
loPDFCreator = Null
Clear All
Return
Define Class PDFCreatorStatus As Session
Implements __clsPDFCreator In "PDFCreator.clsPDFCreatorOptions"
ReadyState = 0
Procedure __clsPDFCreator_eReady() As VOID
* add user code here
This.ReadyState = 1
Endproc
Procedure __clsPDFCreator_eError() As VOID
* add user code here
Endproc
Enddefine
Emerson Santon Reed
http://weblogs.foxite.com/emersonreedhttp://thespoke.net/blogs/emersonreed