Board index » delphi » Getting the Printer Port and Driver Name of a Printer

Getting the Printer Port and Driver Name of a Printer

I am using Crystal Reports in my Delphi 2.0 app, and I have allowed the
user to associate a printer with a report.  Now, when the user prints
the report I want to be able to automatically print the report to the
default printer without popping up a print dialog.  How do I get the
Driver name and Port name so I can pass it to Crystal?

 

Re:Getting the Printer Port and Driver Name of a Printer


Quote
Larry Hengen <henge...@cadvision.com> wrote:
>I am using Crystal Reports in my Delphi 2.0 app, and I have allowed the
>user to associate a printer with a report.  Now, when the user prints
>the report I want to be able to automatically print the report to the
>default printer without popping up a print dialog.  How do I get the
>Driver name and Port name so I can pass it to Crystal?

I am working on something similar, you need to access the GDI, have a
look at the printers.pas VCL that comes with D2, it shows you how its
done.

regards,

Damien

Re:Getting the Printer Port and Driver Name of a Printer


Quote
Damien Lewis wrote:

> Larry Hengen <henge...@cadvision.com> wrote:

> >I am using Crystal Reports in my Delphi 2.0 app, and I have allowed the
> >user to associate a printer with a report.  Now, when the user prints
> >the report I want to be able to automatically print the report to the
> >default printer without popping up a print dialog.  How do I get the
> >Driver name and Port name so I can pass it to Crystal?

> I am working on something similar, you need to access the GDI, have a
> look at the printers.pas VCL that comes with D2, it shows you how its
> done.

> regards,

> Damien

Thanks for the response Damien.  Guess its time to dig through some
source...

Other Threads