Solved

How to print bitmap/image in the document with text only driver?

Posted on 2012-03-21
3
343 Views
Last Modified: 2012-05-21
Hi,
I am developing a dot-matrix printer driver in which i am printing raw text that is it is text only driver but my requirement is it should behave as text only driver in case of texts and when there will be an image in the document then it should print image also.
currently my driver printing raw text and skipping the image in the document.
Where i have to do changes in the driver to solve my purpose?
I am using WDK. You can refer tty sample for more clarification.
Please help me to sort out this issue.

Thanks in advance.
0
Comment
Question by:harshvir_drish
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Herman D'Hondt
ID: 37751715
The text only driver does just that: it prints text only. It is intended for use with printers that do not print graphics, or to create a text file from a document.

If you want to print graphics you need to use a different driver. As you say you are developing one, you will need to use the printer's image commands to print images. These commands will vary from printer to printer (depending on whether the printer supports, PCL, PS, ESC/P, etc). If you write your own driver you will also have to accept that it will only work with compatible printers. And, some printers will not print even text with your driver (so-called GDI printers do not understand text)
0
 

Author Comment

by:harshvir_drish
ID: 37755804
Thanks for response.

Clarified a bit , but still confusion into the mind.

Is it possible my driver behaves as text as well as graphics depending on the data received from the document. Say, when text comes it behaves as raw / text printer and when image (bitmap/ jpeg etc.) comes it behaves as graphics printer.

Or in case of image any suggestion that I can implement into my driver?

Thanks in advance.
0
 
LVL 38

Accepted Solution

by:
Herman D'Hondt earned 500 total points
ID: 37756410
As I said in my first post, you need to send the printer the correct commands to interpret the data as graphics. What those commands are depends on the language the printer supports. For PCL printers the commands are character sequences starting with the ESC character (hex 1B). For details on PCL5 commands, try this link:

http://www.google.com.au/url?sa=t&rct=j&q=download%20bpl13210&source=web&cd=1&ved=0CCMQFjAA&url=http%3A%2F%2Fh20000.www2.hp.com%2Fbc%2Fdocs%2Fsupport%2FSupportManual%2Fbpl13210%2Fbpl13210.pdf&ei=kk1sT5CrE82SiQfDoJ3_BQ&usg=AFQjCNE-ciro1mo40eKeq6kuLJDv6H0EFQ
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

How to solve seemingly unsolvable printer issues. Users sometimes run into printing issues where all the normal steps do not seem to work. Well the steps below can show users how to take one extra step beyond the normal steps needed to remove old…
This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

14 Experts available now in Live!

Get 1:1 Help Now