PDF Print

spc_cz

New Member
Hi,

I tried to print PDF File, but I failed.

/*------------------------------------------------------*/
DEFINE VARIABLE pPDFFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE ch_Acro AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE ltmp AS int.

pPDFFile = 'c:\Test.pdf'.
CREATE "AcroPdf.PDF" ch_Acro .
IF ERROR-STATUS:ERROR THEN RETURN "Cannot Find Acobat COM Automation Object".

ch_Acro:Src = pPDFFile.
ltmp = ch_Acro:LoadFile(pPDFFile).
ch_Acro:print().
RELEASE OBJECT ch_Acro.
/*------------------------------------------------------*/

I get no error message, but nothing is gonna happen.
Can you help me please?
 

spc_cz

New Member
I don't need to generate PDF. Just print only. I can do it with adobe reader from command line
/*--------------*/
os-command value('call "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" /n /h /t /s /o ' + 'c:\tmp\test.pdf "HP"')
/*--------------*/

but I would like to do it "clear". So I prefer "AcroPdf.PDF".
 
Top