[Top][All Lists]

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

Re: [h-e-w] Printing - At Wit's End

From: Michael Flynn
Subject: Re: [h-e-w] Printing - At Wit's End
Date: Tue, 24 Jul 2012 13:56:40 -0700

temporary-file-directory is set to C:\Users\mflynn\AppData\Local\Temp

The instant I hit Enter after typing M-x ps-print-buffer a file called
EP6452j-r  is created in the temporary directory.   It is 36kb in
The Pinter Dialog box opens.   I choose a printer, the instant I hit
OK the temporary file EP6452j-2 goes away, and with some printers
nothing else happens and with some a file called received.xml is
created in the temporary directory but also goes away after less than
a second.
 Below is the top of the file EP6452j-2 and below that are the last
few lines.   The buffer I am trying to print has a quote that you'll
recognize in it.  So the file is a file of postscript, I suppose.
The dialog to choose a printer is called from ghostscript  (gswin32c)
and while that dialog is open I can see in Windows task manager that
gswin32c.exe is called with the parameters we specified in my .emacs
and the file specified is the file EP6452j-2 created in the temporary

While gswin32c.exe is waiting for me to choose a printer, if I run
gswin32.c.exe on the temporary file or on a copy of it, I get this

C:\Users\mflynn\AppData\Local\Temp>gswin32c.exe -q -dNOPAUSE -dBATCH
-sDEVICE=mswinpr2 EP6452jFg
Error: /undefined in State:
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   --nostringval--   fa
lse   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3
%oparray_pop   1909   1   3   %oparray_pop   1803   1   3
%oparray_pop   --nostringval-
-   %errorexec_pop   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1167/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 107
GPL Ghostscript 9.05: Unrecoverable error, exit code 1

If I run ps-print-buffer with an argument and specify as the
output file and  C:\Users\mflynn\AppData\Local\Temp as the
destination, then run gswin32c.exe -q -dNOPAUSE -dBATCH
I get exactly the same error.

Here are the top few and last few lines of the temporary file (of postscript?)

%%Title: *Messages*
%%Creator: ps-print v7.3.5
%%For: Michael Flynn
   State: EDITED, shown value does not take effect until you set or save it.
%%CreationDate: 12:56:47 Jul 24 2012
%%Orientation: Portrait
%%DocumentNeededResources: font Times-Roman Times-Italic
%%+ font Courier
%%+ font Courier-Bold
%%+ font Courier-Oblique
%%+ font Courier-BoldOblique
%%+ font Helvetica
%%+ font Helvetica-Bold
%%DocumentSuppliedResources: procset PSPrintUserDefinedPrologue-mflynn 0 0
%%DocumentMedia: Letter 612 792 0 () ()
%%PageOrder: Ascend
%%Pages: (atend)
%%PageMedia: Letter


/languagelevel where{pop}{/languagelevel 1 def}ifelse
/ErrorMessage  1 def

% === BEGIN ps-print prologue 0
% version: 6.0

% Copyright (C) 2000-2012  Free Software Foundation, Inc.

% This file is part of GNU Emacs.

% GNU Emacs is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation,

... etc.  and it ends like this:

These lines must be kept together because...

/h0 F
/HeaderTitleLineHeight FontHeight def

/h1 F
/HeaderLineHeight FontHeight def
/HeaderDescent    Descent def

/H0 F
/FooterLineHeight FontHeight def
/FooterDescent    Descent def

% ---- ...because `F' has a side-effect on `FontHeight' and `Descent'

/f0 8.5(Courier)cvn DefFont
/f1 8.5(Courier-Bold)cvn DefFont
/f2 8.5(Courier-Oblique)cvn DefFont
/f3 8.5(Courier-BoldOblique)cvn DefFont
/SpaceWidthRatio 0.600000 def

%%BeginFeature: *Duplex False *Tumble False
{BMark/Duplex false/Tumble false EMark setpagedevice}
{statusdict begin false setduplexmode false settumble end}ifelse

%%BeginFeature: *ManualFeed False
BMark /ManualFeed false EMark setpagedevice

%%%% Start of Mule Section

/Latin1Encoding {       % newname fontname  |  font
    findfont dup length dict begin
        { 1 index /FID ne { def } { pop pop } ifelse } forall
        /Encoding ISOLatin1Encoding def
} bind def

%% Redefine fonts for multiple charsets.
/ReDefFont {                 % fontname encoding fdepvector size  |  -
  20 dict begin
  3 index findfont {
    1 index /FID ne 2 index /UniqueID ne and {def} {pop pop} ifelse
  } forall
  /FontType 0 def
  /FMapType 3 def
  /EscChar 0 def
  % FontMatrix ::= [ size 0 0 size 0 0 ]
  /FontMatrix exch [ exch dup 0 exch 0 exch 0 0 ] def
  /FDepVector exch def
  /Encoding exch def
  end                   % fontname dic
  definefont pop
} bind def

/EscChar 0 def

%% End of Mule Section

/F00 /Courier findfont def
/ETOP0 256 array def
0 1 255 { ETOP0 exch 0 put } for
ETOP0 0 0 put
/VTOP0 [F00] def
/ETOP1 256 array def
0 1 255 { ETOP1 exch 0 put } for
ETOP1 0 0 put
/VTOP1 [F00] def
/ETOP2 256 array def
0 1 255 { ETOP2 exch 0 put } for
ETOP2 0 0 put
/VTOP2 [F00] def
/ETOP3 256 array def
0 1 255 { ETOP3 exch 0 put } for
ETOP3 0 0 put
/VTOP3 [F00] def
/Vh0 [ VTOP1 aload pop ] def

Vh0 0 /Helvetica-Bold-latin1 /Helvetica-Bold Latin1Encoding put
/h0 ETOP1 Vh0 14.000000 ReDefFont
/Vh1 [ VTOP0 aload pop ] def

Vh1 0 /Helvetica-latin1 /Helvetica Latin1Encoding put
/h1 ETOP0 Vh1 12.000000 ReDefFont
/VH0 [ VTOP0 aload pop ] def

VH0 0 /Helvetica-latin1 /Helvetica Latin1Encoding put
/H0 ETOP0 VH0 12.000000 ReDefFont
/Vf0 [ VTOP0 aload pop ] def

Vf0 0 /Courier-latin1 /Courier Latin1Encoding put
/f0 ETOP0 Vf0 8.500000 ReDefFont
/Vf1 [ VTOP1 aload pop ] def

Vf1 0 /Courier-Bold-latin1 /Courier-Bold Latin1Encoding put
/f1 ETOP1 Vf1 8.500000 ReDefFont
/Vf2 [ VTOP2 aload pop ] def

Vf2 0 /Courier-Oblique-latin1 /Courier-Oblique Latin1Encoding put
/f2 ETOP2 Vf2 8.500000 ReDefFont
/Vf3 [ VTOP3 aload pop ] def

Vf3 0 /Courier-BoldOblique-latin1 /Courier-BoldOblique Latin1Encoding put
/f3 ETOP3 Vf3 8.500000 ReDefFont

%%Page: 1 1
/Lines 4 def
/PageCount 1 def
1 BeginSheet
/LineNumber 1 def
/PageNumber 1 def
 [/h0 (TestForEmacsPrinting.txt)]
 [/h1 (~/)]
 [/h0 /pagenumberstring load]
 [/h1 (7/24/2012)]
2 SetHeaderLines
0 BeginPage
/f0 F
false BG
0.000 0.000 0.000 FG
0 EF
(This is a test.  We hold these truths to be self-evident, that all
men are created equal, that) S
(they are endowed by their creator with certain unalienable rights,
that among these are Life,) S
(Liberty, and the Pusuit of Happiness.) S

%%Pages: 1



On Tue, Jul 24, 2012 at 10:56 AM, Eli Zaretskii <address@hidden> wrote:
>> Date: Tue, 24 Jul 2012 09:45:04 -0700
>> From: Michael Flynn <address@hidden>
>> Cc: Michel de Ruiter <address@hidden>, address@hidden
>> When trying to ps-print-buffer from emacs, if I select PDF from the
>> printer list, it asks where I want to save the pdf file.  Then the
>> progress dialog shows up, shows a little progress then just stops.
>> In all cases, in *Messages* "Printing..." is written, then immediately
>> "Done" is appended.   Emacs seems to think the print job has finished
>> before it really has time to do anything.
>> It is as if emacs is calling gswin32c.exe or gswin64c.exe  but after
>> starting to communicate with the printer (driver) it kills off the
>> child process that gswin32.c is running in.   It is definitely getting
>> something started because the PDF converter and the HP printer utility
>> are indicating that they have been stimulated.
> Emacs writes the PostScript data to a temporary file, then invokes
> Ghostscript on that temporary file.  What does the following show in
> Emacs?
>    M-: temporary-file-directory RET
> It should show an existing directory on your local disk.  If it does,
> then open that directory in the Window Explorer and try "ps-print"
> again.  You should see a file created there whose name begins with
> "EP".  If you invoke Process Explorer or something similar, you should
> see there gswin32c.exe being invoked with this file as an argument.
> Can you see if all this works as expected?

Michael Flynn
Attorney at Law

The information and any attachments contained in this email
message may be privileged, confidential, and protected from
disclosure. If you are not the intended recipient, any
dissemination or copying is strictly prohibited. If you
think that you may have received this email message in
error, please notify the sender at the email address above.
If you have received this email in error, you are instructed
to delete all copies and discard any printouts without
reading the information contained within.

IRS Circular 230 Disclosure:  To ensure compliance with requirements
imposed by the IRS, we inform you that any U.S. federal tax advice
contained in this communication (including any attachments) is not
intended or written to be used, and cannot be used, for the purpose
of (i) avoiding penalties under the Internal Revenue Code, or (ii)
promoting, marketing or recommending to another party any
transaction or matter addressed herein.

reply via email to

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