http://www.rohitab.com/discuss/index...howtopic=24166
... also has an example using a printer.
http://www.borg.com/~jglatt/tech/winapi.htm
http://www.catch22.net/tuts/kernel1.asp
Such a basic requirement will probably be covered in a general tutorial as an example. So your search term would be "windows driver tutorial". Read them, and use what you read to narrow down further searches.
You should attempt to obtain code for a driver that already exists, and study
that to get to where you want. Many insights are gained this way. There are open source drivers for many printers.
The headings are usually generated by the printer - the printer is expecting to receive something telling it the title and so on. It didn't get the proper strings so it prints "unknown". What it expects can be printer-dependent. Quite a bit can be like this - which is why you need to write a specific driver in the first place. Consult the printer's HW specs or the documentation in a published standard that the printer conforms to.
JPEG images (and other formats)
Usually you have to convert the image to something the printer can handle before you can use it. The prgram used to display the image usually does this for you so you don't notice and it
looks like the image is just sent to the printer.
What the printer will handle depends on the printer. Postscript is popular. Considering the first question, you may want to convert the image to ascii art
Note: since you have not produced any code, nor stated what you are using to program in or how you are going about it, these suggestions are general pointers - where to look. When seeking
free advise in an
open source intensive forum, it is polite to provide more background, at least. (There is no way anyone will help you create a closed source driver for eg.)