Page 1 of 1

Trying to stop output going to default printer

Posted: Mon Jun 05, 2006 3:09 am
by griffo
I am trying to silently print a MS-Word RTF doc to a PDF file using
the 3.5 Printer Driver API for Clarion.

This did work earlier today in the proc I am developing but stopped
working silently and now insists on popping up a "Save As" window
requiring folder selection and click of [OK]

It is sneding the output to the Default printer when I invoke

PDFPrinter.Run(szRTFDoc,SW_HIDE)

If I set my default printer to my HP Laserjet, output goes direct to printer.
If I set my default printer to my installed "PDF Exchange printer
3.0", then I get the popup.

I copied the provided code from the HTMLtoPDF silent print example.
I set these values to try force silent print...

SaveInfo.FullFileName = szPDFDoc ! Full Drive\Path\Filename.pdf
SaveInfo.ShowSaveDialog = 0 ! No saveDialogue please
SaveInfo.App_Run = 0 ! I want SILENT Print
SaveInfo.App_Params = '' !0 ! I want SILENT Print

Does having the separate "PDF Exchange Printer 3.0" installed conflict
with trying to print to a PDF with the Drivers API?

Should I be setting a PrinterName somewhere to force the .Run output
to go via the API drivers?

John Griffiths

Re: Trying to stop output going to default printer

Posted: Mon Jun 05, 2006 4:13 am
by griffo
griffo wrote:I am trying to silently print a MS-Word RTF doc to a PDF file using
the 3.5 Printer Driver API for Clarion.

This did work earlier today in the proc I am developing but stopped
working silently and now insists on popping up a "Save As" window
requiring folder selection and click of [OK]
Fixed! :) Seems I was closing the active Window too quickly. I removed a POST(Event:CloseWindow) from my subroutine and controlled the window close within a TIMER.

John Griffiths

Posted: Mon Jun 05, 2006 6:31 am
by John - Tracker Supp
Pleased you got there John,

Please do come back if you have any problems.