Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Emerson Reed
  Where is Emerson Reed?
 Americana - SP
 Brazil
 Emerson Reed
 Tags
Subject: VFP X PDFCreator
Thread ID: 118089 Message ID: 118089 # Views: 43 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Wednesday, January 10, 2007 5:09:36 PM         
   


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/emersonreed
http://thespoke.net/blogs/emersonreed




COMPLETE THREAD

Tip: click here to scan for Windows Registry Errors and Optimize PC performance
VFP X PDFCreator Posted by Emerson Reed @ 1/10/2007 5:09:36 PM
RE: VFP X PDFCreator Posted by Ken Murphy @ 1/10/2007 5:12:24 PM
RE: VFP X PDFCreator Posted by Emerson Reed @ 1/10/2007 5:18:20 PM
RE: VFP X PDFCreator Posted by Ken Murphy @ 1/10/2007 5:12:28 PM