开发者

Program/algorithm that creates a .PRN file of any file format for a specific printer! Please help!

开发者 https://www.devze.com 2023-01-13 07:19 出处:网络
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).

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:

  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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消