473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Printing to a Dot Matrix printer using C# .NET

Hello,

I am trying to print a System.Drawing.Printing.PrintDocument to a dot matrix printer using C# .NET. I have created an instance of the PrintDocument and create a event handler for the PrintPage property of the PrintDocument.

PrintDocument document = new PrintDocument();
document.PrintPage += new PrintPageEventHandler(pd_PrintInvoicePage);
document.Print();

However, when I try to print to the dot matrix printer the printer carriage moves alittle bit, but nothing is printing. If I open up a word document and and type some random text the dot matrix printer prints, but will not successfully print the PrintDocument that I have created. I created a little class that sends raw data to the printer and the printer prints properly, however it will not print the PrintDocument. Any suggestions as to how to correct my problem? Thanks.

Anthony
Aug 25 '07 #1
1 5312
kenobewan
4,871 Expert 4TB
Please search the site first. There have been other threads that may help. Thanks.
Aug 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Mario | last post by:
Hello all, I'm trying hard to make possible to print some simple text from python to the default printer using wxPython, after days of internet searches I found this page:...
1
by: Aditya | last post by:
Hi, I am working on a Web based Intranet application and one of the requirements of the project is to print to a dot matrix printer. The users access the application through a web browser (IE)...
2
by: Marc Champagne | last post by:
Hi folks, I wish to print on pre-printed continuous forms on a dot matrix printer. My initial intent was to access to printer directly (in raw mode, somehow) in order to send whatever is...
2
by: Ryan Gregg | last post by:
I'm working on a project where I need to be able to print a single line at a time to a dot matrix printer. Essentially we have a log printer and each time an event occurs on the system I need to...
7
by: DazedAndConfused | last post by:
I have a 8.5 x 11 landscape document with about 1/4 inch of space on the left and right where there is no print. The document displays perfect in print preview, but when I print it, about 1/2 inch...
1
by: Paul H | last post by:
I am developing a database where some reports need to print to a laser and some need to print to a dot matrix printer. I am not interested in how to do this programmatically, I will let the user...
3
by: Rich Kayton | last post by:
I have an application that is currently a DBASE/Clipper application. We print out a variety of custom labels on Epson DOT matrix printers. I would like to be able to print these labels. I am...
3
by: Adam Right | last post by:
Hi, Anyone knows how to print with dot matrix printer ? I want to print text with some formatting such as bold, underlined font, and landscape document etc... How can i do this with C#? Thanks...
9
by: Gurbinder Kaur | last post by:
Hi, i have made a project for printing fee receipt. Using Windows-XP, VBasic 6.0 & Ms-Access-97. i have designed a form for prinring receipts. m paper-size is 5x10. Two copies of bills in this...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.