Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP X PDFCreator
Message
From
10/01/2007 11:07:08
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brazil
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFP X PDFCreator
Miscellaneous
Thread ID:
01184219
Message ID:
01184219
Views:
97
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
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Reply
Map
View

Click here to load this message in the networking platform