Solved

Printing

Posted on 2001-06-12
7
244 Views
Last Modified: 2010-04-06
Hi,

I am printing information to a line printer and I want it to stop ejecting to the end of page after each time I send. I want t continuously send without going to a new page. Is there a way to turn this off.

Thnx.
0
Comment
Question by:dvk
7 Comments
 
LVL 8

Expert Comment

by:Cesario
ID: 6180885
Hi dvk,

how do you send the lines to the line printer ?

AFAIK, you must send to the Printer an ESC Command..

Regards

Cesario
0
 
LVL 1

Expert Comment

by:mscatena
ID: 6180913
There could be a couple of things...

Each print job in Windows is a multiple of page by definition. One easy way is not to send "jobs" with Printer.BerinDoc/Printer.EndDoc but rather send the lines directly to the printer, like:

var
  f : TextFile;
begin
//  AssignFile(f, 'LPT1');
  AssignFile(f, '\\server1\epson810');
  Rewrite(f);
  WriteLn(f, Memo1.Text);
  CloseFile(f);
end;

You can send a "form feed" - Write(f, #12); - to force a page ejection.

You must also check if the printer is ejecting after the last line. This is controlled by an escape sequence.

Mauro
0
 

Author Comment

by:dvk
ID: 6180920
I've used two methods but didn't get it to stop. I'm currently using this.


AssignPrn(PrintText);
Rewrite(PrintText);
Printer.Canvas.Font := Memo1.Font;
for Line := 0 to Memo1.Lines.Count - 1 do
  Writeln(PrintText, Memo1.Lines[Line]);
CloseFile(PrintText);

0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Accepted Solution

by:
mscatena earned 100 total points
ID: 6180960
It looks like it?s a setting in your printer.

Another way is to use the ?Generic / Text only? printer and adjust it?s properties so it uses continuous paper without like feed. Then you might eve use BeginDoc/EndDoc.
0
 
LVL 8

Expert Comment

by:Cesario
ID: 6180965
I agree with mscatena.
Just look in you Printer Manuel for the right ESC Sequenz
0
 
LVL 3

Expert Comment

by:VSF
ID: 6183097
Take a look at this link:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20027475

Procedure TForm1.Button1Click(Sender: Object);
var
 Imp: TextFile;
begin
 AssignFile(Imp, 'LPT1');
 Rewrite(Imp);
 Write(Imp, 'Isto vai sair na impressora');
   
 Write(Imp, #27#69 + 'Bold Printing' + #27#70); {Bold}
 Write(Imp, #15 + 'Condensed mode' + #18); {condensed}
 Write(Imp, #12); { page jump}
 CloseFile(Imp);
end;

0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6975871
One of your questions is reasonably current all others are not and need your attention.  ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20063066.html
http://www.experts-exchange.com/questions/Q.20133784.html
http://www.experts-exchange.com/questions/Q.20178269.html
http://www.experts-exchange.com/questions/Q.20189429.html
http://www.experts-exchange.com/questions/Q.20237069.html
http://www.experts-exchange.com/questions/Q.20287910.html



*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now