1819682 Members
3567 Online
109605 Solutions
New Discussion

PCL files

 
SOLVED
Go to solution
jerry1
Super Advisor

PCL files

Does anyone know how to handle PCL files
when trying to view and print them from
a PC via Samba share.

Printing a PCL file from the UNIX side is
not a problem. Although you can't view it
very well. But trying to print from Windows
does not work nor is PCL recognized by any
apps on PC, unless there is some tool that
needs to be installed.

Basically we would like to view and print
PCL files from Windows.
1 REPLY 1
Bill Hassell
Honored Contributor
Solution

Re: PCL files

PCL is actually a plain old ASCII file with a few (to thousands) of escape sequences to format the text. Unlike PDF or JPG files, the format is not suitable for display at all--it is a printer language and would require a printer formatter to display the result. About all you can see (on Unix or Windows) is simple text. All the rest of the codes control font downloads, graphics elements, even macros within the printer. And there are several versions of PCL with the higher levels (PCL 3,4,5,etc) customized to the target printer.

PCL contains too much variation to be easily converted to a display device like a screen. The other popular printer language is Postscript and although there are 3 versions, it is a page layout and definition language, and more generalized so that different printers can interpret the codes to match the capabilities of the print engine. And note that unlike Windows where the printer interface between the program and printer driver is a generalized meta language, no such facility exists in Unix.

As far as Samba file sharing, remember that text files are incompatibile between Unix and Windows. You can fix them on the Unix side with ux2dos and dos2ux, but Windows lacks usefulo tools in this regard. The reason is that Windows uses CR+LF at the end of each line while Unix use just LF. This is very likely the cause of the PCL printing problems. The PCL file on Unix has LF at the end of each line but when Windows prints the file, the missing CR causes a stairstep down the paper. You could filter the program with ux2dos but if the PCL file also contains imbedded fonts and/or graqphics content, ux2dos will incorrectly interpret some binary codes aqs text terminators and insert CR in the middle of a font description.

There is no easy solution. If you have HP printers, you can use a separator page to tell the printer to interpret LF as CR+LF in text strings. When fonts are being downloaded, the printer is smart enough to turn off the LF mapping.


Bill Hassell, sysadmin