FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour PDFCreator 2.2
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM

PDFCreator 2.2

Posted: Wed Nov 11, 2015 03:44 PM

Hi to all,

i used your sample program (below) to adjust my program do get pdf file
This is ok til version 1.7xx of PDFCreator

Now with the PDFCreator 2.2 samething has changed and the below program does not works !

Seems it uses other keys of windows

Any help ?

Tks

Romeo/Zingoni


FUNCTION SETTAREG( cDir , cFile , cAutoSave )
LOCAL oReg

oReg:=TReg32():New( HKEY_CURRENT_USER , "SOFTWARE\PDFCreator\Program" )
oReg:Set( "UseAutosave" , cAutoSave )
oReg:Set( "UseAutosaveDirectory" , cAutoSave )
oReg:Set( "AutosaveDirectory" , UPPER( cDir ) )
oReg:Set( "AutosaveFilename" , UPPER( cFile ) )

oReg:Close()

RETURN .T.


Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM

Re: PDFCreator 2.2

Posted: Wed Nov 11, 2015 06:04 PM
Maybe,

Code (fw): Select all Collapse
IF EMPTY( oPC := WIN_OLECreateObject( "PDFCreator.clsPDFCreator" ) )
      MsgStop("Pdf Creator não esta instalado neste computador.",;
                "Prodedimento abortado")
        
      RETURN .F.
   ENDIF
    
   oPC:__hSink := __AxRegisterHandler( oPC:__hObj, {|X| nEvent := X} )

   oPC:cStart( "/NoProcessingAtStartup" )
   oPC:_cOption( "UseAutosave", 1 )
   oPC:_cOption( "UseAutosaveDirectory", 1 )
   oPC:_cOption( "AutosaveDirectory", "C:\TESTE\" )
   oPC:_cOption( "AutosaveFilename", "MyPdf.pdf" )
   oPC:_cOption( "AutosaveFormat", 0 )

   oPC:cDefaultPrinter := "PDFCreator"
   oPC:cClearCache()
   oPC:cPrinterStop := .F.

    PRINTER oPrnPdf NAME "Gerando pdf" ;
            to "PDFCreator"  //modal

        DEFINE FONT oFnt1 NAME "Arial" SIZE 0,-20 OF oPrnPdf 

        oPrnPdf:SetPortrait()
        nRcol := oPrnPdf:nlogpixelx()/2.54
        nRlin := oPrnPdf:nlogpixely()/2.54

        PAGE 
          oPrnPdf:say(05*nRlin,05*nRcol,;
                     "TESTE COM PDFCREATOR",;
                     oFnt1,,,,0)
        ENDPAGE
        
    ENDPRINTER

   nTime := hb_milliseconds()
   DO WHILE nEvent == 0 .AND. (hb_milliseconds() - nTime) < 10000
      hb_idleSleep( 0.5 )
      /* The following dummy line is required to allow COM server to send event [Mindaugas] */
      oPC:cOption("UseAutosave") 
   ENDDO
    
   hb_idleSleep( 0.7 )
   oPC:cClose()
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM

Re: PDFCreator 2.2

Posted: Wed Nov 11, 2015 06:27 PM

Tks, but i got error:

HB_FUN_WIN_OLECreateObject...unresolved external
..........__AXREGISTRERHANDLER "" ""

may by i have un old version of FWH8.10 (!)

Tks any

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM

Re: PDFCreator 2.2

Posted: Wed Nov 11, 2015 07:21 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM

Re: PDFCreator 2.2

Posted: Thu Nov 12, 2015 10:53 AM

Backs to version 1.2.0

Marco Boschi
info@marcoboschi.it
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM

Re: PDFCreator 2.2

Posted: Fri Nov 13, 2015 03:21 PM
the example does not works for pdfcreator 2.*
works well only with previous version 1.7 or less

tks any


karinha wrote:Look,

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=31000&p=178826&hilit=pdfcreator#p178826

http://forums.fivetechsupport.com/viewtopic.php?f=6&t=28973&p=163191&hilit=pdfcreator#p163191


Regards,

Continue the discussion