I have an industrial printer that requires .prn files to print. I'd like to automate generation of these files using software I write. We start with TIFF files, and then we use special software from the printer vendor to generate the .prn files.

Can I use an ImageMagick extension, Ghostscript, or something else (must run on Linux) to generate these files? I'm using Node.js, but I can easily using bindings or call out to an external shell program.

From Google:

A PRN file extension is a Windows file format that allows you to use the "print to a file" option. You can convert a PRN file to the PDF file format by renaming it as a file of the PS extension if your printer is a PostScript printer. You can then run it with a program like GhostScript.


Short answer: No.
Long answer: As far as I know, .prn file extension is used freely by companies. The Google quote you mentioned might be true for some cases but certainly not for every case. For example there is a program called Ultraprint by Hosonsoft to rasterize tiff images before printing with UV printer. It also exports a prn file and they don't provide command line scripting either. You could reverse engineer the exported files but it would be huge undertaking.


Probably not.

.prn files are the final output of the printer driver (to be directly sent to the device), and so they do not necessarily have a standard format – the contents are model-dependent. With regular printers, the .prn file might contain standard PDF, PostScript, PCL5, etc. but it might just as well contain custom manufacturer formats.

So for your printer, the answer is already in the question – they must be generated by the special software that comes with your printer.

That said, it might be possible to obtain documentation for that format (or reverse-engineer it), and someone else might have already done so (search the Internet), but it's not very likely – and you'll need to be very specific about the model.

But contact your printer manufacturer first. They might already have the tools, or at least some way to run the existing program from command line – which you can then automate via Node (even across systems if required).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.