help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing from WindowXP version of emacs


From: Lennart Borgman
Subject: Re: Printing from WindowXP version of emacs
Date: Fri, 23 Dec 2005 15:06:43 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

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.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<




reply via email to

[Prev in Thread] Current Thread [Next in Thread]