yvanrodrigues.com Forum Index yvanrodrigues.com
Welcome to my web site and blogs.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun Sep 05, 2010 8:42 pm
All times are GMT - 5 Hours
Forum index » My blogs » My Technical Blog
Garbage printing when printing from Mac via LPR/LPD or IP
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Yvan
Site Admin


Joined: 19 Mar 2005
Posts: 721

PostPosted: Mon Jun 27, 2005 1:27 pm    Post subject: Garbage printing when printing from Mac via LPR/LPD or IP
Subject description: How to address problems caused by binary files on Macintosh
Reply with quote

Symptoms
When printing from a Macintosh to a printer using any non-Appletalk method such as LPR/LPD, IPP, Rendezvous, USB, etc., certain files will result in many "garbage" pages being printed, each one usually having a line or several lines of random characters.

This behaviour is present on many printers including many made by Hewlett-Packard (HP). Similar behaviour occurs if the users prints via a print server such as a Windows print queue that ultimately ends up printing the file using one of the IP methods.

Cause
The Postscript code that is being sent to the printer contains binary data that is incorrectly formatted and is unexpected to these printers.

Contrary to many articles on the internet, the problem is not because these printers cannot handle binary-encoded postscript but rather an assumption the printer makes about the data based on the type of connection established by the client machine.

The purpose of binary encoding postscript is to reduce the size of the resulting postscript file and/or increase the speed at which the Postscript interpreter is able to process the file. Binary encoding is supported in Postscript levels 2 and 3. There are two ways postscript can be binary encoded, "Postscript Binary" and "Tagged Binary Core Protocol", or TBCP. Some people will refer to Postscript Binary as "standard format". This is incorrect and misleading, as Adobe defines Standard Protocol as a text-only serial protocol.

Printers affected by this problem assume that binary data received over Appletalk connections is encoded in Postscript Binary and assume that binary data received over non-Appletalk (IP) connections are encoded using TCBP. This is an incorrect but fair assumption that results in the printing of garbage.

The Macs should not be sending Postscript in this format because:
(a) Postscript Binary was superceded by TBCP

Quote:
[The Postscript Binary] encoding scheme allows the full range of 8-bit values to be transmitted as data, while also providing for certain communications functions. This protocol is suitable for use with any language; however, it is obsolete and has been superseded by TBCP.


(b) the sender of the document is required to check the PPD file of the printer for the Protocols line to see what protocols it supports. These printers do not advertise support of Postscript Binary format in their PPD files.

Quote:
Before using the binary communications protocol, a driver must determine if doing so is appropriate—that is, communications are via a serial or parallel channel connected to a product that supports it. The binary communications protocol is never supported over communications channels that are inherently binary to begin with, such as Appletalk or SCSI. Additionally, the protocol is not available in all printers. To determine whether or not the protocol is available, applications should check the PostScript Printer Description (PPD) file.

(c) Postscript Binary encoding is not to be used in EPS nor print-to-file Postscript files.

Quote:
Because the binary communications protocol is a device-dependent feature, it should not be used in Encapsulated PostScript (EPS) files or in print-to-disk files. In such cases, it is safer to avoid binary data or to use binary data with no escaping. Note that the binary communications protocol can be applied later to a job stream without needing any high-level knowledge about the job. Instead, it should be used only when the printer driver (or host application sending the job to the printer) can determine that it is connected directly to a printer. If your application does not have the ability to determine this, then the choice of using the binary communications protocol should be brought to the user-interface level.


Solutions
  • Ensure that all images used in documents are saved in ASCII format. This will require that all images be opened in their native applications and be resaved, ensuring that ASCII format is selected. An article on HP's website discusses how to do this in several applications. (recommended)
  • Only print these documents using Appletalk. This will require that Appletalk be enabled at the printer and/or server. (not recommended)
  • Check with the printer manufacturer to see if this issue has been addressed in a firmware update (recommended)
  • Convert the Postscript file to ASCII using a tool such as the unix od utility. (advanced)
  • If printing via a Windows print server, purchase and install my print processor (currently in beta) which will convert the binary Postscript to ASCII on-the-fly. (recommended)
  • If printing directly to the printer, use the BINPS queue via LPR if it exists (recommended - thanks Santino Rizzo and Brian Scarborough)


References
Microsoft KB158903: Garbled Output from Macintosh to Shared PostScript Printer
Postscript Language Reference, Third Edition, Adobe Systems Incorporated, Addison-Wesley Publishing Company, 1985-1999, ISBN 0-201-37922-8
Postscript Language Reference Supplement, Adobe Postscript 3 Version 3010 and 3011 Product Supplement, Adobe Systems Incorporated, 1999
Adobe Serial and Parallel Communications Protocols Specification, Adobe Developer Support, Adobe Systems Incorporated, 1990-1992

[Keywords: gibberish gobbledygook garbage tcp/ip ipp lpr lpd print print processor spooler mac macintosh osx os x 9 TBCP BCP standard binary rendezvous microsoft apple windows server 2003 xp nt queue sfmprint KB158903 q158903 standard protocol raw binps auto]
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Forum index » My blogs » My Technical Blog
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.5870s ][ Queries: 8 (0.2333s) ][ Debug on ]