Solved

Printing Single Line without formfeed on Dot matrix Printer

Posted on 1998-05-15
3
253 Views
Last Modified: 2013-12-04
How would you print a single line at a time to a dot matrix printer without the driver causing a formfeed. The line actually has to print on the paper. Just buffering lines until you have a page full is not what is needed. Microsoft had raw.drv for 16 bit apps that worked. Haven't seen anything for 32 programming. Thanks.
0
Comment
Question by:glaporte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
dnavarro earned 100 total points
ID: 1401976
Simply open the printer as a file and print to it.  From Visual Basic:

OPEN "LPT1" FOR OUTPUT AS #1
PRINT  "This is my text";   <--  The semicolon is the key
CLOSE

We use EPSON dot matrix printers here at work for printing labels and this is how we print to the printers without going through the printer drivers.

--Dave

0
 
LVL 1

Expert Comment

by:dnavarro
ID: 1401977
Oops, I meant:

PRINT#1, "This is my text";

--Dave
0
 

Author Comment

by:glaporte
ID: 1401978
Use CreateFile() for opening the port.
WriteFile() to write to the port.
CloseHandle() for closing the port.

0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

724 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