Bug 163780

Summary: psset with duplex or tumble flags corrupts postscript output
Product: [Fedora] Fedora Reporter: Barry Wright <barry>
Component: a2psAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3CC: kasparek, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: FC6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-12 17:43:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Barry Wright 2005-07-20 23:53:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414

Description of problem:
psset -d <filename>.ps or psset -t <filename>.ps
insets two lines that contain the ps command "countdictstack" in the postscript output, unfortunately the inserted text is corrupted as it appears as ^Ountdictstack.
psset <filename>.ps   or   psset -nd <filename>.ps do not include this ps command so are not effected.

Fedora1 (a2ps-4.13b-30) and Fedora2 (a2ps-4.13b-37) did not exhibit this problem. The problem is still present with Fedora4 (a2ps-4.13b-46)

If a Fedora3 machine has a2ps-4.13b-30 on it the fault still remains ....

If psset is edited and the two occurences of "countdictstack" have a space inserted before the keyword the resulting postscript file will print okay as the keyword appears uncorrupted as
 countdictstack
and
 countdictstack exch sub dup 0 gt

Version-Release number of selected component (if applicable):
a2ps-4.13b-41

How reproducible:
Always

Steps to Reproduce:
1.Use psset -o test.ps -d <filename>.ps 
2.Inspect test.ps for occurence of countdictstack

Actual Results:  countdictstack replaced by ^Ountdictstack in test.ps. File will not print. ehandler.ps reports 
OFFENDING COMMAND:   untdictstack
if sent to printer.

Expected Results:  Postscript file processed by psset should be printed out.

Additional info:

a2ps can be used to achieve the duplex printing instead of using psset.

SAMPLE OUTPUT SECTIONS
Fedora1 (a2ps-4.13b-30)
<snip>
pdfMakeFont
612 792 pdfSetup
% Pagedevice definitions:
countdictstack
% Push our own mark, since there can be several PS marks pushed depending
% where the failure really occured.
/psset_mark
{
%%BeginFeature: *Duplex true
  (<<) cvx exec /Duplex (true) cvx exec (>>) cvx exec
  systemdict /setpagedevice get exec
%%EndFeature
%%BeginFeature: *Tumble true
  (<<) cvx exec /Tumble (true) cvx exec (>>) cvx exec
  systemdict /setpagedevice get exec
%%EndFeature
} stopped
% My cleartomark
{ /psset_mark eq { exit } if } loop
countdictstack exch sub dup 0 gt
{
  { end } repeat
}{
  pop
} ifelse
%%EndSetup
<end snip>


Fedora3 (a2ps-4.13b-41)
<snip>
%%BeginSetup
% Pagedevice definitions:
^Ountdictstack
% Push our own mark, since there can be several PS marks pushed depending
% where the failure really occured.
/psset_mark
{
%%BeginFeature: *Duplex true
  (<<) cvx exec /Duplex (true) cvx exec (>>) cvx exec
  systemdict /setpagedevice get exec
%%EndFeature
%%BeginFeature: *Tumble false
  (<<) cvx exec /Tumble (false) cvx exec (>>) cvx exec
  systemdict /setpagedevice get exec
%%EndFeature
} stopped
% My cleartomark
{ /psset_mark eq { exit } if } loop
^Ountdictstack exch sub dup 0 gt
{
  { end } repeat
}{
  pop
} ifelse
%%EndSetup
<end snip>

Comment 1 Tomas Kasparek 2005-11-15 16:57:31 UTC
It is somehow related to sed, with a2ps-4.13b-41 and sed-4.0.9-1.i386.rpm its
OK, with sed-4.1-1.i386.rpm it does not work.

Comment 2 Matthew Miller 2006-07-10 22:58:43 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!