🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #295

Re: Printing PCL Format direct from Delphi

#295
From: J French
Date: Sun, 11 Sep 2005 07:19
22 lines
1904 bytes
On 10 Sep 2005 21:07:52 -0700, venkateswarag@gmail.com wrote:

>Hi,
>
>Can anyone help me in the following !!!
>How to get the list of installed printers and display the list in the
>dropdown box using Tprinter class.

  ListBox1.Items.Text := Printer.Printers.Text;

>I need to send the PCL format file to printer directly for selected
>printer from the dropdown list. 

You therefore need to bypass the printer's canvas

The simplest method I know of is to use the OpenPrinter API 
then StartDocPrinter
then possibly StartPagePrinter
then dump the contents of the file using: WritePrinter
then possibly EndPagePrinter
then EndDocPrinter
then ClosePrinter
Technical Details
Message-ID: <4323d6bb.258385046@news.btopenworld.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!news-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
References: <1126411672.276817.12660@f14g2000cwb.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10baee,eaf7bf8998d29cfc
X-Google-Thread: 1043cf,eaf7bf8998d29cfc
X-Google-Thread: fd817,eaf7bf8998d29cfc
X-Google-Thread: 1091e5,eaf7bf8998d29cfc
X-Google-Attributes: gid10baee,gid1043cf,gidfd817,gid1091e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!news-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
From: erewhon@nowhere.uk (J French)
Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.objectpascal,alt.comp.lang.borland-delphi,borland.public.delphi.winapi
Subject: Re: Printing PCL Format direct from Delphi
Date: Sun, 11 Sep 2005 07:19:38 +0000 (UTC)
Organization: BT Openworld
Lines: 22
Message-ID: <4323d6bb.258385046@news.btopenworld.com>
References: <1126411672.276817.12660@f14g2000cwb.googlegroups.com>
Reply-To: erewhon@nowhere.uk
NNTP-Posting-Host: host81-130-122-120.in-addr.btopenworld.com
X-Trace: nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com 1126423178 22698 81.130.122.120 (11 Sep 2005 07:19:38 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Sun, 11 Sep 2005 07:19:38 +0000 (UTC)
X-Newsreader: Forte Free Agent 1.1/32.230