Solved

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

Posted on 2012-03-21
3
351 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 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

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…
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
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…

734 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