Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-03-21
3
Medium Priority
?
357 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
[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 39

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 39

Accepted Solution

by:
hdhondt earned 1500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

722 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