views:

62

answers:

2

I need an algorithm that converts any file format to its .PRN file equivalent which will be compatible for a specific printer (for example, only in CANON printers).

Or I need a source code or way to know how printer drivers work. Printer drivers are the one who specifies or creates the .PRN file of any type. So please help me. Thanks!

A: 

Since you said, from any format to .prn format, I am taking two cases here assuming Windows environment:

  1. Let's say your source is MS_WORD (.doc) file. If you have the appopriate printer installed, you can easily get the .prn file, by opening the file in MS-WORD and doing print using the appropriate printer. However, before this, set the port to "File" in Control Panel for the particular driver.

  2. However assuming you have a file in some xyz format, for which there is no rendering application needed, you may have to identify a converter on a case to case basis probably

Chubsdad
i got your point but i need a stand alone program that converts a specific file (lets just say a JPEG file) to a .PRN equivalent for an xyz printer. I need this to be applied on an embedded system.
@user429126: May be you can check for jpg to pcl or ps converter. .prn files internally mostly use pcl or ps. There is nothing called .prn file format if I understand it right.
Chubsdad
A: 

Consider dowloading the windows driver kit (WDK), it has free printer driver sample code, you can find the full list of sample code it has here. Also, you can look at the printer driver docs here

Ivan Bohannon