Board index » delphi » Problems with Generic/Text Only printer driver

Problems with Generic/Text Only printer driver

One more try, hope, anybody can help:

I'm trying to do simple text output to a printer via AssignPrn() and
WriteLn() to a Generic/Text Only printer in Win 95. (What really is
the task is print labels or addresses on a special highspeed InkJet
printer).

The problem: for every WriteLn() there are 2 linefeeds being output,
which I was not able to get rid of 'til now.

I believe the problem must be in the printer driver, although printing
e.g. from notepad or simply copying to LPT1 from a DOS box works
properly.

Has anybodey had such a problem? Can anybode give some suggestions? Or
at least a workaround?

Any help greatly appreciated!!!!

Thanks in advance
Bernd

 

Re:Problems with Generic/Text Only printer driver


This is a multi-part message in MIME format.
--------------053852EAE86F1B5E897C5412
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit

Quote
B. Weikert wrote:
> The problem: for every WriteLn() there are 2 linefeeds being output,
> which I was not able to get rid of 'til now.

I would guess that your printer is translating the #13#10 pair that a
writeln would generate into two line feeds instead of one. Instead of
using writeln use write but add a #13 to the end of the string so...

readln(infile,s);
write(printer,s+#13);

If the #13 doesn't work, try #10 instead.

Hope this helps

--

Martin Brooks - Systems Administrator
=====================================
Image Data Systems (UK) Ltd
82-84 Clerkenwell Road
London
EC1M 5RJ

  T: 0171 336 7942
  F: 0171 336 7943
  E: mar...@image-data.com
UIN: 2178117

- Computers make very fast, very accurate mistakes. -

--------------053852EAE86F1B5E897C5412
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Martin  Brooks
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Martin  Brooks
n:              Brooks;Martin
org:            Image Data Systems (UK) Ltd
adr:            82-84 Clerkenwell Road;;;London;;EC1M 5RJ;UK
email;internet: mar...@image-data.com
title:          Systems Administrator
tel;work:       +44 (0) 171 336 7942
tel;fax:        +44 (0) 171 336 7943
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard

--------------053852EAE86F1B5E897C5412--

Other Threads