Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] old dos .prn files
On 9/7/2011 3:16 AM, Peter Nikolic wrote:
Right

have some dos .prn files they are not text they appear to be binary in nature
odes anyone have any idea how to open these i do not want to print them as that
means the rescanning them.

file 800XLT-1.PRN
800XLT-1.PRN: HP Printer Job Language data

Ideas anyone please

Pete .


.prn is not any specific type of data.

_IF_ these are print jobs captured to file from old dos apps, then you have to know what kind of printer that app was printing to back when it was used.

The data will be printer-specific.

On the plus side the choices of printers and printer data formats were fewer and there was almost something like a few common standards back then. Usually either PCL (HP LaserJet) or Epson dot-matrix, or possibly PostScript.

Today there are a zillion printers that all speak their own individual language and the actual print data that passes to the printer is meaningless garbage to any other printer or software. But back then, less so. Most dot-matrix printers from any manufacturer spoke some close variant of what the Epson MX spoke, or had an emulation mode which did exactly that. Most Laser printers spoke PCL and/or PostScript.
Ink jets and non-PCL lasers from other manufacturers came along later and were only shipped with Windows & Mac drivers by then.

If the application that wrote this was coded to print to a laserjet, then the data is PCL (HP LaserJet data, which can have both plain text with markup escape codes and binary blobs for raster images and soft fonts) You can use ghostpdl to read PCL data and output a PDF.
Install ghostpdl
http://download.opensuse.org/repositories/home:/aljex/openSUSE_11.3/x86_64/ghostpdl-9.01-33.5.x86_64.rpm

then "pcl2pdf foo.prn foo.pdf"


If the application were coded to print to a dot-matrix printer then it's probably Epspon / IBM Proprinter data which is usually 99% plain text with a few markup escape codes, but utterly different than PCL. There is such a thing as raster image data for dot-matrix but it's not too common since it would kill ink ribbons and print-heads and be noisy as hell. I don't know of any epson decoders off-hand, but the epson codes were so simple you could just ignore them and read the plain text, or probably a fairly simple awk script could translate them into html. But if you had this you would have known it and not said it looks like binary junk.

You can also try running "file foo.prn" and see if the file magic util recognizes the data. (You might have to "zypper in file")

If the data is PostScript the file command should recognize it and you could try renaming the file to foo.ps and just open it in gv or gimp or use ghostscript to output a pdf.

If the file command doesn't recognize the data, and it's not PCL, and you can't tell from looking at the data directly, then you simply have to have some clue about the app that originally wrote it, or post the data here and maybe someone else can recognize something you don't.

--
bkw
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References