From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: Printing from WindowXP version of emacs Date: Fri, 23 Dec 2005 15:06:43 +0100 Message-ID: <43AC0473.7030109@student.lu.se> References: <1134660719.186074.250590@z14g2000cwz.googlegroups.com> <43A8842E.5090204@student.lu.se> <43A908F9.1070304@student.lu.se> <43A9B6D5.9010205@student.lu.se> <43A9DBB8.3010204@student.lu.se> <43AA5D94.8000602@student.lu.se> <43AB10BE.1040104@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135347206 13137 80.91.229.2 (23 Dec 2005 14:13:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Dec 2005 14:13:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 23 15:13:25 2005 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Epnfe-0005WH-9y for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Dec 2005 15:13:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Epngh-0005zE-Ax for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Dec 2005 09:14:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EpnaO-0002z1-7o for help-gnu-emacs@gnu.org; Fri, 23 Dec 2005 09:07:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EpnaM-0002yO-Cn for help-gnu-emacs@gnu.org; Fri, 23 Dec 2005 09:07:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpnaL-0002yJ-Vw for help-gnu-emacs@gnu.org; Fri, 23 Dec 2005 09:07:54 -0500 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EpnZc-0008Cs-Vl; Fri, 23 Dec 2005 09:07:09 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.069.1) id 43ABF6D5000042B4; Fri, 23 Dec 2005 15:06:44 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Eli Zaretskii In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32188 Archived-At: Eli Zaretskii wrote: >The text translated to printer commands (i.e. RAW) comes back to the >spooler, so I think the spooler must know how to handle it. > > After som new tests I believe your assumption is right. Data from "copy" etc probably always goes into the first step in the spoolers handling of the data. See further below for more. > > >>We are talking about two problems. I wanted it to be very clear that >>there are only two options that we are aware of now to get color printing: >> >> 1) Using the externa program Ghostscript >> 2) Using the elisp file htmlize-view.el (or something similar) >> >> > > 3) Use a PostScript printer. > > I think we agree more and more (or at least are more and more clear). I do not know if this is a good advice or not, I seldom buy a printer. In many environments it is of course like "choose your parents", but I am sure you know that ;-) > > >>I would like to solve that too if we can. At the moment I am out of >>ideas. Not totally of course (see above), but I do not know what to test >>further. >> >> > >Can you try ``connecting'' that printer to LPT1 or a similar port? >Click Start->Settings->Printers and Faxes, then right-click on the >printer's name, select Properties, and click on the Ports tab. Find a >free printer port and click on its checkbox. Then see if COPY and/or >Emacs can print to that port as if it were a file (in Emacs, set >printer-name to that port). > Is this different from "net use" in some respect? I have used that in the command file below. The command file does two things: 1) copy file.txt \\host\queue 2) net use lpt1: \\host\queue copy file.txt lpt1: I have done this for one printer using different queue names. The result is that it works for one name, but not for the other. I also used a third name, but I am not quite clear if this is a queue name. It appears however in the printer queue window header. (I did not have time to check this - perhaps I will do that later.) When it worked it worked in both case 1 and 2 above. To make this more understandable I give the command file and the output results below. I could check this more in details than I have. I do not know however if there is more to gain from that. Perhaps it is better that other people try to test this too. In my case I believe this means that I can print from Emacs simple black and white. I takes some time to test which queue to use, but the command file below could make that job easier of course. I however still suggest avoiding that job, printing through the web browser instead. I also do not know if there is any reason to believe that one queue alwasy work on any printer (if there are several queues). Here is the command file *print-copy-test.cmd*: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @setlocal @if not "" == "%1" goto print @echo. @echo Usage: prtest \\host\queu @echo. @goto end :print @echo. @echo. @echo *Print tests of %1 ... @echo ============================ net use lpt1: /d @rem net use lpt1: @rem dir %1 @rem @echo %errorlevel% @rem goto end @echo. @echo. @echo **** Print test 1 of %1 @echo @rem Print test 1 of %1 > temp1.cmd @echo copy temp1.cmd %1 >> temp1.cmd @rem @type temp1.cmd @call temp1.cmd @echo. @echo. @echo **** Print test 2 of %1 @echo @rem Print test 2 of %1 > temp2.cmd @echo net use lpt1: %1 >> temp2.cmd @echo if errorlevel 1 goto end >> temp2.cmd @echo copy temp2.cmd lpt1 >> temp2.cmd @echo net use lpt1: /d >> temp2.cmd @echo :end >> temp2.cmd @rem @type temp2.cmd @call temp2.cmd @echo. @echo. @rem net use lpt1: :end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< And here are the outputs of my tests using the command file above (I removed the output from the first net use /d): >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C:\test>print-copy-test.cmd \\host\printer-name *Print tests of \\host\printer-name ... ============================ **** Print test 1 of \\host\printer-name C:\test>copy temp1.cmd \\host\printer-name The network path was not found. 0 file(s) copied. **** Print test 2 of \\host\printer-name C:\test>net use lpt1: \\host\printer-name System error 67 has occurred. The network name cannot be found. C:\test>if errorlevel 1 goto end C:\test> **************************************** C:\test>print-copy-test.cmd \\host\printer-nameduplex *Print tests of \\host\printer-nameduplex ... ============================ **** Print test 1 of \\host\printer-nameduplex C:\test>copy temp1.cmd \\host\printer-nameduplex 1 file(s) copied. **** Print test 2 of \\host\printer-nameduplex C:\test>net use lpt1: \\host\printer-nameduplex The command completed successfully. C:\test>if errorlevel 1 goto end C:\test>copy temp2.cmd lpt1 1 file(s) copied. C:\test>net use lpt1: /d lpt1 was deleted successfully. C:\test> **************************************** C:\test>print-copy-test.cmd \\host\printer-namepcl *Print tests of \\host\printer-namepcl ... ============================ **** Print test 1 of \\host\printer-namepcl C:\test>copy temp1.cmd \\host\printer-namepcl 1 file(s) copied. **** Print test 2 of \\host\printer-namepcl C:\test>net use lpt1: \\host\printer-namepcl The command completed successfully. C:\test>if errorlevel 1 goto end C:\test>copy temp2.cmd lpt1 1 file(s) copied. C:\test>net use lpt1: /d lpt1 was deleted successfully. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<