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.
******
PDFCreator 2.2
Re: PDFCreator 2.2
Maybe,
Code: Select all
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
Re: PDFCreator 2.2
Tks, but i got error:
HB_FUN_WIN_OLECreateObject...unresolved external
..........__AXREGISTRERHANDLER "" ""
may by i have un old version of FWH8.10 (!)
Tks any
HB_FUN_WIN_OLECreateObject...unresolved external
..........__AXREGISTRERHANDLER "" ""
may by i have un old version of FWH8.10 (!)
Tks any
Re: PDFCreator 2.2
Look,
http://forums.fivetechsupport.com/viewt ... or#p178826
http://forums.fivetechsupport.com/viewt ... or#p163191
Regards,
http://forums.fivetechsupport.com/viewt ... or#p178826
http://forums.fivetechsupport.com/viewt ... or#p163191
Regards,
João Santos - São Paulo - Brasil
- MarcoBoschi
- Posts: 925
- Joined: Thu Nov 17, 2005 11:08 am
- Location: Padova - Italy
- Contact:
Re: PDFCreator 2.2
the example does not works for pdfcreator 2.*
works well only with previous version 1.7 or less
tks any
works well only with previous version 1.7 or less
tks any
karinha wrote:Look,
http://forums.fivetechsupport.com/viewt ... or#p178826
http://forums.fivetechsupport.com/viewt ... or#p163191
Regards,