Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-21
3
Medium Priority
?
358 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 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

926 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