How to get "printer ready bytes" from a source in c#?
Posted
by luis_villase
on Stack Overflow
See other posts from Stack Overflow
or by luis_villase
Published on 2010-06-01T21:51:42Z
Indexed on
2010/06/01
21:53 UTC
Read the original article
Hit count: 171
Hey everyone!
I'm in a bit of trouble here, hoping you can help a fellow programmer out.
I have an application that receives a pointer to raw bytes (plus length and stuff) and sends said raw data to a printer. This is important, I have no choice but to use this method to get any printing done.
If I send a raw string, it will print with no problem. However, I need to be able to print formatted text, images, etc. So the thing is... I would like to be able to get printer ready bytes from a given source (maybe a pdf, or html, does not matter as long as it contains formatted text and/or images). It would be like "splitting" the print command like so:
a) Open file and read data b) Load printer data into memory c) Send bytes to printer
Obviously, I've got a) and c) covered, it's b) the one that's breaking my head.
Any thoughts?
Thanks in advance for your help.
© Stack Overflow or respective owner