TPW 1.5 using LPT1 to print with LEXMARK PRINTER 
Author Message
 TPW 1.5 using LPT1 to print with LEXMARK PRINTER

printer :  text

begin
  assign(PRINTER,'lpt1');
  rewrite(PRINTER);

writeln(printer,'xyz');

this does not work

any help or input?

thanks




Thu, 25 Sep 2003 05:22:56 GMT  
 TPW 1.5 using LPT1 to print with LEXMARK PRINTER

Quote:
> printer :  text

> begin
>   assign(PRINTER,'lpt1');
>   rewrite(PRINTER);
> writeln(printer,'xyz');

> this does not work
> any help or input?

I haven't used TPW at all, but one thing you quite likely
need to do is add a statement saying
  write(printer, #12);
to force a form feed - often this is the only way to get
anything actually printed. And don't forget to close the
file when you've finished writing to it!

--
The Scarlet Manuka



Sat, 27 Sep 2003 10:49:47 GMT  
 TPW 1.5 using LPT1 to print with LEXMARK PRINTER
Did you put Close(printer); at the end of the program?



Quote:
> printer :  text

> begin
>   assign(PRINTER,'lpt1');
>   rewrite(PRINTER);

> writeln(printer,'xyz');

> this does not work

> any help or input?

> thanks





Mon, 06 Oct 2003 21:53:15 GMT  
 TPW 1.5 using LPT1 to print with LEXMARK PRINTER
Evert Pot schreef:

Quote:

> Did you put Close(printer); at the end of the program?



> > printer :  text

> > begin
> >   assign(PRINTER,'lpt1');
> >   rewrite(PRINTER);

> > writeln(printer,'xyz');

> > this does not work

> > any help or input?

> > thanks



I think it should be: 'uses Printer;'
'var Printer: text;' is already defined in Printer.tpu

Huub.



Tue, 07 Oct 2003 03:41:46 GMT  
 TPW 1.5 using LPT1 to print with LEXMARK PRINTER

Quote:

> Did you put Close(printer); at the end of the program?



> > printer :  text

> > begin
> >   assign(PRINTER,'lpt1');
> >   rewrite(PRINTER);

> > writeln(printer,'xyz');

> > this does not work

> > any help or input?

Which Lexmark printer do you use? A cheap inkjet like the Z11? Then
you are lost. You have a GDI printer that does not even understand
ASCII. You could try printing to a file and copying the file to prn in
a DOS box (this is caught by the driver and read as PCL).

Try:

assign (PRINTER, 'tempfile');
rewrite (PRINTER);
{ ... }
close (PRINTER);

and then execute 'COMMAND /C COPY /B tempfile LPT1:' using WinExec or
WinExecWait.

--
#!/usr/bin/perl
eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X
$0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"});
####################### http://learn.to/quote #######################



Tue, 07 Oct 2003 00:17:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Problem printing color bitmap on color printer wih TPW 1.5

2. TPW 1.5 and printers

3. outputting direct to printer instead of screen - TPW 1.5

4. printer unit for TPW 1.5

5. printing to printer in turbo pascal 1.5

6. Printing with TPW 1.5

7. Printing with TPW 1.5

8. TPW 1.5 Printing Fonts

9. TPW 1.5 -Printing??

10. TPW 1.5 and printing

11. TPW 1.5 and Printing

12. runtime errors using TPW 1.5 in Win95

 

 
Powered by phpBB® Forum Software