PDFCreator 2.2

PDFCreator 2.2

Postby Romeo » Wed Nov 11, 2015 3: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.
******
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: PDFCreator 2.2

Postby karinha » Wed Nov 11, 2015 6:04 pm

Maybe,

Code: Select all  Expand view

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
User avatar
karinha
 
Posts: 7804
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: PDFCreator 2.2

Postby Romeo » Wed Nov 11, 2015 6: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
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: PDFCreator 2.2

Postby karinha » Wed Nov 11, 2015 7:21 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7804
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: PDFCreator 2.2

Postby MarcoBoschi » Thu Nov 12, 2015 10:53 am

Backs to version 1.2.0
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: PDFCreator 2.2

Postby Romeo » Fri Nov 13, 2015 3:21 pm

the example does not works for pdfcreator 2.*
works well only with previous version 1.7 or less

tks any


Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests