to print in Pascal 
Author Message
 to print in Pascal

Hye,

As I can get that it always prints in the same place.  
Like the comand "gotoxy(x,y)" for the screen, but I want for the paper.

Thank you very much for the help.



Tue, 29 Mar 2005 07:16:10 GMT  
 to print in Pascal

Quote:
> As I can get that it always prints in the same place.  
> Like the comand "gotoxy(x,y)" for the screen, but I want for the paper.

   If I understand your request, the best you can do is use the printer's
c/r (carriage return), backspace, tab, or writes of spaces to reprint
over the same physical line of paper.  There is no way to "move around"
the printer's paper/sheet, though...


Tue, 29 Mar 2005 12:35:41 GMT  
 to print in Pascal
Shall it be some universal solution or can it be one specific for your
printer model? If the second applies to you, get a instrunction-manual
of your printer. Ask the manufacturer of the printer about it. It
contains all commands (even graphics) your printer does understand. With
this you have much more possibilities than stated in Mike Copeland's
reply. But if you need a quick'n simple solution, use his.

If you send a CHR(12) to the printer, it will eject the paper. This
works on almost all printers. CR+LF is CHR(10)+CHR(13) or
CHR(13)+CHR(10), I never can remember which way it is, but on the
printer it should work in both ways.

Greetings

Markus



Tue, 29 Mar 2005 20:38:17 GMT  
 to print in Pascal


posted at Fri, 11 Oct 2002 04:35:41 :-

Quote:
>> As I can get that it always prints in the same place.  
>> Like the comand "gotoxy(x,y)" for the screen, but I want for the paper.

>   If I understand your request, the best you can do is use the printer's
>c/r (carriage return), backspace, tab, or writes of spaces to reprint
>over the same physical line of paper.  There is no way to "move around"
>the printer's paper/sheet, though...

Actually, there is, in effect.

Declare var A : array [1..60] of string [80]; fill it with characters
including overwriting with Move; then, when ready, print each line and
move to a new page.

It may be wise to fill the strings with spaces at the start of each
page.

        FillChar(A, SizeOf(A), #32);
        for K := Low(A) to High(A) do A[K][0] := #80 ;

may be quickest for that.

Since Borland have not provided WriteS(S, ,,,,,) where S is the
destination string, Str() will need to be used to output numbers, etc.

--

  <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
  <URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
  <URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.



Tue, 29 Mar 2005 20:47:09 GMT  
 to print in Pascal
Also, if you're going to use the goto() command you must also consider
the size of the window. Pascal counts its window size in characters.
If the WinCrt window is used, I believe it's 150x80. Look at it like a
spreadsheet of values. :)


Thu, 28 Apr 2005 04:27:41 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Printing in Pascal

2. Printing using Pascal

3. Printing using Pascal

4. PRINT in PASCAL FOR WIN

5. printing in Pascal 7 - need help

6. printing in pascal

7. Printing in Pascal

8. Text color printing in Pascal on HP deskjet 660C

9. Printing On Pascal.

10. Graphics printing under Pascal

11. HP Color-Printing in Pascal

12. Printing with Pascal (6.0)

 

 
Powered by phpBB® Forum Software