Program/algorithm that creates a .PRN file of any file format for a specific printer! Please help!
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开发者_如何学C. Thanks!
Since you said, from any format to .prn format, I am taking two cases here assuming Windows environment:
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.
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
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
精彩评论