Solved

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

Posted on 2012-03-21
3
348 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:hdhondt
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:
hdhondt 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

If you use a Brother DCP 130C or similar Brother printer, at some point you might encounter the following problem: after you change the ink cartridge, the printer displays an "ink empty" message. Sometimes you just need to follow the instructions…
When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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