From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.devel Subject: Re: Windows Printing Date: Fri, 19 May 2006 17:36:57 +0200 Message-ID: References: <446CF318.2000703@student.lu.se> <446DA523.90602@gnu.org> <446DC710.4050806@student.lu.se> <446DCA56.4050902@gnu.org> <446DCB43.9010608@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1148053120 21436 80.91.229.2 (19 May 2006 15:38:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 May 2006 15:38:40 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org, Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 19 17:38:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fh73W-0001MY-L6 for ged-emacs-devel@m.gmane.org; Fri, 19 May 2006 17:38:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh73W-0001UG-82 for ged-emacs-devel@m.gmane.org; Fri, 19 May 2006 11:38:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fh73J-0001Th-RB for emacs-devel@gnu.org; Fri, 19 May 2006 11:38:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fh73G-0001Sj-2K for emacs-devel@gnu.org; Fri, 19 May 2006 11:38:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh73F-0001Sg-SI for emacs-devel@gnu.org; Fri, 19 May 2006 11:38:05 -0400 Original-Received: from [193.99.153.30] (helo=seneca.benny.turtle-trading.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fh76X-0003Bh-RX; Fri, 19 May 2006 11:41:30 -0400 Original-Received: from seneca.benny.turtle-trading.net.turtle-trading.net (seneca.benny.turtle-trading.net [127.0.0.1]) (authenticated bits=0) by seneca.benny.turtle-trading.net (8.12.8/8.12.8) with ESMTP id k4JFaxLo010112; Fri, 19 May 2006 17:37:05 +0200 Original-To: Lennart Borgman In-Reply-To: <446DCB43.9010608@student.lu.se> (Lennart Borgman's message of "Fri, 19 May 2006 15:42:27 +0200") User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54813 Archived-At: Hi Lennart, Lennart Borgman writes: > I found that different (professional) printers were in different > states before printing. Some accepted plain text, some accepted > postscript. Some printers support several printing languages or modes (like plain text, Postscript and PCL). There are printers that stay in the mode that was used for the last print job until a timeout occurs, because they don't actually recognise the end of the job. The way that the high-level printer drivers that come with the OS handle the situation is to send a prefix containing escape commands before the actual print job. The escape commands are crafted such that they are ignored in Postscript mode but switch the printer to Postscript in all other modes. It is easy enough to add such a prefix to print jobs when printing from Emacs. A bit of browsing in Custom suggests setting the variable ps-user-defined-prologue. The problem seems to me to find out what precisely should be in that prefix. Often you can use some print-to-file option in the OS-supplied printer driver to generate a dummy file. You can than transcribe the correct prefix bytes from that file. When this doesn't work you really need to look at the printer documentation, assuming you have that or can find it on the 'Net. benny