Solved

Printing Single Line without formfeed on Dot matrix Printer

Posted on 1998-05-15
3
252 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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