Skip to main content
Participating Frequently
August 29, 2011
Answered

duplex not working in postscript file

  • August 29, 2011
  • 1 reply
  • 5019 views

My program generates postscript files which are then sent to a printer.  I am trying to add support for duplex printing.  I added the "<</Duplex true>> setpagedevice" statement to the postscript generator but the resulting file still prints in simplex.  The statement does change the printer's behavior... it feeds each page except the last page into the duplex unit but when each page comes out the second time, the back is still blank.  The second page then prints on a second sheet of paper.  So there is no net change in output from adding the duplex statement to the script.

Below is the text for a sample file.  It should print 2 copies of a 2-sided report, a total of 2 pages.  Instead it is printing 2 copies of a 2-page single-sided report, a total of 4 pages.

Thank you for any help you can provide.

%!PS
%% Text

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Center String - Draws the string centered on the X,Y
/CenterString {
dup stringwidth
2 div neg exch % wy / 2
2 div neg exch % wx / 2
rmoveto show                 
} bind def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Right String - Draws the string right-aligned on the X,Y
/RightString {
dup stringwidth
neg exch % wy / 2
neg exch % wx / 2
rmoveto show                 
} bind def

% RightJustify - Like RightString, but doesn't draw the text
/RightJustify {
dup stringwidth
neg exch % wy / 2
neg exch % wx / 2
rmoveto
} bind def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Border - Draws a border for the current area
% BorderWidth Border
/Border {
1 div setlinewidth
newpath
0 0 moveto
1 0 rlineto
0 1 rlineto
-1 0 rlineto
closepath
stroke
} def


%% Shapes
% DrawRectangle - Draws a Rectangle
% X1  Y1  X2  Y2  LineWidth Gray
/DrawRectangle {
gsave

setgray
setlinewidth
 
% Define new dictionary to store these variables
% within the scope of this routine
4 dict begin % - Begin scope-level dictionary


/Y2 exch def
/X2 exch def
/Y1 exch def
/X1 exch def

newpath
X1 Y1 moveto
X1 Y2 lineto
X2 Y2 lineto
X2 Y1 lineto
closepath
stroke

end % End the scope-level dictionary
grestore
} def

% FillRectangle - Draws a Rectangle and fills it with the color
% X1  Y1  X2  Y2  Gray BackgroundGray LineWidth
/FillRectangle {
gsave

setlinewidth
 
% Define new dictionary to store these variables
% within the scope of this routine
6 dict begin % - Begin scope-level dictionary

/BG exch def
/BORDER exch def
/Y2 exch def
/X2 exch def
/Y1 exch def
/X1 exch def

newpath
X1 Y1 moveto
X1 Y2 lineto
X2 Y2 lineto
X2 Y1 lineto
closepath
gsave
BG setgray
fill
grestore
BORDER setgray
stroke


end % End the scope-level dictionary
grestore
} def


% - Graphing - %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphLinLog - Draws graph lines for a Linear X-Axis and
% Log Y-Axis
% x y width height angle borderlinewidth xdivisions xminordivisions xmajorline xminorline ydivisions ymajorline ymidline yminorline
/GraphLinLog {

17 dict begin % Begin scope-level dictionary

/YMinLineWidth exch def
/YMidLineWidth exch def
/YMajLineWidth exch def
/YDivisions exch def
/XMinLineWidth exch def
/XMajLineWidth exch def
/XMinDivisions exch def
/XMajDivisions exch def
/BorderWidth exch def
/Angle exch def
/Height exch def
/Width exch def
/Y exch def
/X exch def
/X2 X Width add def
/Y2 Y Height add def
/CurrentY 0 def

% Set up the graphics (scale, angle, etc)
GraphSetup

% Draw the X-Axis (linear)
GraphLinX

% Draw the Y-Axis (linear)
GraphLogY

% Draw the Y-Axis decline rate labels
GraphLogYDecline


end % End scope-level dictionary
} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphLogY - Draws y-axis lines for a logarithmic scale
/GraphLogY {
gsave
1 dict begin % Begin scope-level dictionary

% Find the scaled size of each y division
/YDivScale Height YDivisions div def


% Start Graphing
newpath
0 0 moveto

/Times-Roman findfont 4 scalefont setfont

% Create the 8 Minor y-axis lines for each y-division
YMidLineWidth setlinewidth
1 1 YDivisions {
  dup 1 sub YDivScale mul /CurrentY exch def
  1 1 8 {
   dup dup 1 add exch div log YDivScale mul
   CurrentY add /CurrentY exch def  
   Width CurrentY moveto
   3 0 rmoveto
   1 add dup 1 string cvs show
   Width CurrentY moveto
   0 CurrentY lineto
   -5 0 rmoveto
   1 string cvs show
   0 CurrentY moveto
  } for
  stroke
 
  YDivScale mul 0 exch moveto
} for
stroke

% Create the Y-axis major lines for each cycle
YMajLineWidth setlinewidth % Set major line width
0 0 moveto
YDivisions 1 sub { Width YDivScale rmoveto Width neg 0 rlineto } repeat
stroke

% Create the Y-Axis fill-in lines
newpath
0 0 moveto

YMinLineWidth setlinewidth
4 YDivisions gt {
  1 1 YDivisions {
   pop % - Get rid of the current iteration. It doesnt matter what it is
   1 1 3 {
    .1 .1 .999999 {
     exch dup 3 -1 roll add dup .1 sub div log YDivScale mul Width exch rmoveto
     Width neg 0 rlineto
    } for
    1 add dup .1 sub div log YDivScale mul 0 exch rmoveto
   } for
   4 YDivisions gt {
    4 1 9 {
     .2 .2 .9 {
      exch dup 3 -1 roll add dup .2 sub div log YDivScale mul Width exch rmoveto
      Width neg 0 rlineto
     } for
     1 add dup .2 sub div log YDivScale mul 0 exch rmoveto
    } for
   } {
    10 4 div log YDivScale mul 0 exch rmoveto
   } ifelse
  
  } for
 
  stroke
} if

end % End scope-level dictionary
grestore
} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphLogYDecline - Draws exponential decline labels for
% logarithmic y axis
/GraphLogYDecline {
/Times-Bold findfont 6 scalefont setfont
YMinLineWidth setlinewidth
Width Height moveto

2 1 10 YDivisions mul {
  dup 2 string cvs exch
  100 div 1 exch sub % rdec
  log XMajDivisions mul abs % rdel_cyc
  dup floor % del_cyc
  dup 3 -1 roll % Push the duped del_cyc back 2 spots
  exch sub 1 exch sub Height YDivisions div mul exch % y (push it back behind the del_cyc)
  YDivisions abs 1 sub exch sub Height YDivisions div mul add
  /CurrentY exch def
 
  CurrentY 0 gt {
   Width CurrentY moveto
   5 0 rlineto
   3 -2 rmoveto
   CenterString
  } {
   pop % givin up shots to the double glock glock
  } ifelse
 
} for
stroke
} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphLinX - Draws x-axis lines for a linear scale
/GraphLinX {
2 dict begin % Start scope-level dictionary

/XMajDivScale Width XMajDivisions div def
/XMinDivScale XMajDivScale XMinDivisions div def


newpath

% Draw the minor lines
XMinLineWidth setlinewidth
0 0 moveto
1 1 XMajDivisions XMinDivisions mul {
  XMinDivScale mul 0 moveto
  0 Height rlineto
} for
stroke

% Draw the major lines
XMajLineWidth setlinewidth
0 0 moveto
1 1 XMajDivisions {
  XMajDivScale mul 0 moveto
  0 Height rlineto
} for
stroke

end % End scope-level dictionary
} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphSetup - Performs common setup functions for graphing
% Assumes that X, Y, Width, Height, and Angle defined
/GraphSetup {
% Set color to black
0 setgray

% Set Origin to X,Y
X Y Height sub translate
} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% GraphBorder - Draws a border for the graph (using the
% current origin, angle, and scale)
% Assumes that BorderWidth is defined and scale/
/GraphBorder {
BorderWidth Width div setlinewidth
newpath
0 0 moveto
1 0 rlineto
0 1 rlineto
-1 0 rlineto
closepath
stroke
} def
<</NumCopies 2>> setpagedevice
<</Collate true>> setpagedevice
<</Duplex true>> setpagedevice
gsave
<</Orientation 3>> setpagedevice
90 rotate
/Times-Roman findfont [ 12 0 0 12 0 0 ] makefont setfont
6.61287431064084E-16 -10.8 moveto
() show
/Times-Bold findfont [ 12 0 0 12 0 0 ] makefont setfont
0 setgray
489.6 -28.8 moveto
(XTO Energy, Inc.) show
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
49.5 -127.8 moveto
(Run Date :   01/10/11) show
49.5 -135 moveto
(Run Time:   10:33:16) show
396 -46.8 756 -118.8 1 0 DrawRectangle
/Times-Roman findfont [ 10 0 0 10 0 0 ] makefont setfont
450 -102.6 moveto
(BASE) CenterString
450 -113.8 moveto
(500100) CenterString
576 -69 moveto
(XTO ENERGY) CenterString
576 -80.2 moveto
(AETNA \(BARTON R\)) CenterString
576 -91.4 moveto
(LOGAN, ARKANSAS) CenterString
576 -102.6 moveto
(19 8N 26W) CenterString
576 -113.8 moveto
(VJG) CenterString
702 -102.6 moveto
(ARKOMA) CenterString
702 -113.8 moveto
(100102) CenterString
/Times-Bold findfont [ 12 0 0 12 0 0 ] makefont setfont
576 -57.6 moveto
(ACEE            1-19) CenterString
/Times-Roman findfont [ 10 0 0 10 0 0 ] makefont setfont
396 -129.96 moveto
() show
396 -139.96 moveto
(XTO - 01/01/2011 FORECAST \(___\)) show
756 -129.96 moveto
(SWC  BRM  BDH        ) RightString
756 -139.96 moveto
() RightString
40.5 -46.8 391.5 -118.8 1 0 DrawRectangle
0.5 setlinewidth
[ ] 0 setdash
newpath
49.5 -91.8 moveto
333 0 rlineto
stroke
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
49.5 -103.95 moveto
(WI    -) show
49.5 -110.95 moveto
(NRI  -) show
103.5 -103.95 moveto
(100.00000 %) RightString
103.5 -110.95 moveto
(85.87514 %) RightString
99.9 -56.7 moveto
(Oil) CenterString
99.9 -62.7 moveto
(\(bbls/mo\)) CenterString
135.9 -56.7 moveto
(Gas) CenterString
135.9 -62.7 moveto
(\(mcf/mo\)) CenterString
0.01 setlinewidth
[ ] 0 setdash
newpath
49.5 -65.31 moveto
157.5 -65.31 lineto
stroke
49.5 -70.71 moveto
(Qi) show
49.5 -76.11 moveto
(Qel) show
49.5 -81.51 moveto
(Decline) show
114.3 -70.71 moveto
(0) RightString
114.3 -76.11 moveto
(0) RightString
114.3 -81.51 moveto
(0.0) RightString
121.5 -81.51 moveto
(%) RightString
150.3 -70.71 moveto
(398) RightString
150.3 -76.11 moveto
(398) RightString
150.3 -81.51 moveto
(10.0) RightString
157.5 -81.51 moveto
(%) RightString
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
245.25 -56.7 moveto
(Oil) CenterString
245.25 -62.7 moveto
(\(bbls\)) CenterString
285.75 -56.7 moveto
(Gas) CenterString
285.75 -62.7 moveto
(\(mcf\)) CenterString
[ ] 0 setdash
newpath
175.5 -65.31 moveto
310.5 -65.31 lineto
stroke
175.5 -70.71 moveto
(Gross Cum @ 12/10) show
175.5 -76.11 moveto
(Gross Remaining) show
175.5 -81.51 moveto
(Gross Ultimate) show
175.5 -86.91 moveto
(Net Remaining) show
261 -70.71 moveto
(0) RightString
261 -76.11 moveto
(0) RightString
261 -81.51 moveto
(0) RightString
261 -86.91 moveto
(0) RightString
310.5 -70.71 moveto
(490,388) RightString
310.5 -76.11 moveto
(398) RightString
310.5 -81.51 moveto
(490,786) RightString
310.5 -86.91 moveto
(342) RightString
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
324 -56.7 moveto
(Res_Cat.) show
324 -62.1 moveto
(Life) show
324 -67.5 moveto
(As-of-Date) show
324 -72.9 moveto
(Settings) show
324 -78.3 moveto
(Scenario) show
324 -83.7 moveto
(DBS) show
382.5 -56.7 moveto
(PDP) RightString
382.5 -62.1 moveto
(0.083) RightString
382.5 -67.5 moveto
(01/2011) RightString
382.5 -72.9 moveto
(SEC11) RightString
382.5 -78.3 moveto
(CTOC) RightString
382.5 -83.7 moveto
(OP) RightString
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
130.5 -99.45 moveto
(Oil Price) CenterString
130.5 -105.45 moveto
(\($/bbl\)) CenterString
[ ] 0 setdash
newpath
117 -108.06 moveto
144 -108.06 lineto
stroke
130.5 -113.46 moveto
(0.00) CenterString
166.5 -99.45 moveto
(Gas Price) CenterString
166.5 -105.45 moveto
(\($/mcf\)) CenterString
[ ] 0 setdash
newpath
153 -108.06 moveto
180 -108.06 lineto
stroke
166.5 -113.46 moveto
(3.51) CenterString
202.5 -99.45 moveto
(OPC) CenterString
202.5 -105.45 moveto
(\($/bbl\)) CenterString
[ ] 0 setdash
newpath
189 -108.06 moveto
216 -108.06 lineto
stroke
202.5 -113.46 moveto
(24.02) CenterString
238.5 -99.45 moveto
(Flat Life) CenterString
238.5 -105.45 moveto
(\(years\)) CenterString
[ ] 0 setdash
newpath
225 -108.06 moveto
252 -108.06 lineto
stroke
238.5 -113.46 moveto
(1.0) CenterString
276.75 -99.45 moveto
(First | Last) CenterString
276.75 -105.45 moveto
(Production) CenterString
[ ] 0 setdash
newpath
261 -108.06 moveto
292.5 -108.06 lineto
stroke
276.75 -113.46 moveto
(06/82 | 06/11) CenterString
317.25 -99.45 moveto
(2011 Net) CenterString
317.25 -105.45 moveto
(Cash Flow) CenterString
[ ] 0 setdash
newpath
301.5 -108.06 moveto
333 -108.06 lineto
stroke
317.25 -113.46 moveto
($          -189) CenterString
362.25 -99.45 moveto
() CenterString
362.25 -105.45 moveto
(P.W. @ 10.0 %) CenterString
[ ] 0 setdash
newpath
342 -108.06 moveto
382.5 -108.06 lineto
stroke
362.25 -113.46 moveto
($            -188) CenterString
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
216 -45 moveto
(BFIT) CenterString
108 -144 741.6 -576 1.5 0 DrawRectangle
gsave
2 setlinejoin
108 -144 633.6 432 0 1.5 20 4 0.5 0.01 3 1 0.5 0.01 GraphLinLog
/Times-Roman findfont [ 8 0 0 8 0 0 ] makefont setfont
-9.6 1.6 moveto
(10.) RightString
-9.6 145.6 moveto
(100.) RightString
-9.6 289.6 moveto
(1,000.) RightString
-9.6 -6.4 moveto
(1.) RightString
-9.6 137.6 moveto
(10.) RightString
-9.6 281.6 moveto
(100.) RightString
/Times-Bold findfont [ 9 0 0 9 0 0 ] makefont setfont
15.84 -9.9 moveto
(1997) CenterString
47.52 -9.9 moveto
(1998) CenterString
79.2 -9.9 moveto
(1999) CenterString
110.88 -9.9 moveto
(2000) CenterString
142.56 -9.9 moveto
(2001) CenterString
174.24 -9.9 moveto
(2002) CenterString
205.92 -9.9 moveto
(2003) CenterString
237.6 -9.9 moveto
(2004) CenterString
269.28 -9.9 moveto
(2005) CenterString
300.96 -9.9 moveto
(2006) CenterString
332.64 -9.9 moveto
(2007) CenterString
364.32 -9.9 moveto
(2008) CenterString
396 -9.9 moveto
(2009) CenterString
427.68 -9.9 moveto
(2010) CenterString
459.36 -9.9 moveto
(2011) CenterString
491.04 -9.9 moveto
(2012) CenterString
522.72 -9.9 moveto
(2013) CenterString
554.4 -9.9 moveto
(2014) CenterString
586.08 -9.9 moveto
(2015) CenterString
617.76 -9.9 moveto
(2016) CenterString
/Symbol findfont [ 5.5 0 0 5.5 0 0 ] makefont setfont
newpath
0.8 setlinewidth
0 323.7081503561 moveto
0 323.7081503561 lineto
2.64 0 rlineto
2.64 318.285866854977 lineto
2.64 0 rlineto
5.28 327.876643017471 lineto
2.64 0 rlineto
7.92 324.863384648026 lineto
2.64 0 rlineto
10.56 314.30878608039 lineto
2.64 0 rlineto
13.2 327.412164661933 lineto
2.64 0 rlineto
15.84 315.528689624912 lineto
2.64 0 rlineto
18.48 320.852679494075 lineto
2.64 0 rlineto
21.12 313.979419128719 lineto
2.64 0 rlineto
23.76 315.890068253945 lineto
2.64 0 rlineto
26.4 315.930092834763 lineto
2.64 0 rlineto
29.04 316.368680835319 lineto
2.64 0 rlineto
31.68 321.368311199306 lineto
2.64 0 rlineto
34.32 309.087091481152 lineto
2.64 0 rlineto
36.96 312.770708557136 lineto
2.64 0 rlineto
39.6 318.362884605345 lineto
2.64 0 rlineto
42.24 318.401357941159 lineto
2.64 0 rlineto
44.88 315.890068253945 lineto
2.64 0 rlineto
47.52 315.286605172709 lineto
2.64 0 rlineto
50.16 319.16589564618 lineto
2.64 0 rlineto
52.8 315.448098885159 lineto
2.64 0 rlineto
55.44 317.275907923942 lineto
2.64 0 rlineto
58.08 317.74407035026 lineto
2.64 0 rlineto
60.72 315.246166499852 lineto
2.64 0 rlineto
63.36 318.401357941159 lineto
2.64 0 rlineto
66 312.008552003527 lineto
2.64 0 rlineto
68.64 317.001185902145 lineto
2.64 0 rlineto
71.28 315.32701771395 lineto
2.64 0 rlineto
73.92 317.821757820367 lineto
2.64 0 rlineto
76.56 309.973547221556 lineto
2.64 0 rlineto
79.2 319.393446189748 lineto
2.64 0 rlineto
81.84 318.401357941159 lineto
2.64 0 rlineto
84.48 316.089935491477 lineto
2.64 0 rlineto
87.12 315.367404157326 lineto
2.64 0 rlineto
89.76 314.472821336125 lineto
2.64 0 rlineto
92.4 315.084149814951 lineto
2.64 0 rlineto
95.04 315.205701661563 lineto
2.64 0 rlineto
97.68 312.686481735793 lineto
2.64 0 rlineto
100.32 313.606795948514 lineto
2.64 0 rlineto
102.96 316.368680835319 lineto
2.64 0 rlineto
105.6 317.040505869108 lineto
2.64 0 rlineto
108.24 313.689793180861 lineto
2.64 0 rlineto
110.88 316.328936057753 lineto
2.64 0 rlineto
113.52 316.368680835319 lineto
2.64 0 rlineto
116.16 314.185476664047 lineto
2.64 0 rlineto
118.8 311.323192756427 lineto
2.64 0 rlineto
121.44 309.576196327073 lineto
2.64 0 rlineto
124.08 315.890068253945 lineto
2.64 0 rlineto
126.72 310.455794587944 lineto
2.64 0 rlineto
129.36 312.728609326065 lineto
2.64 0 rlineto
132 317.782926148586 lineto
2.64 0 rlineto
134.64 312.221195545339 lineto
2.64 0 rlineto
137.28 312.306050925242 lineto
2.64 0 rlineto
139.92 308.051887330311 lineto
2.64 0 rlineto
142.56 311.795182962045 lineto
2.64 0 rlineto
145.2 309.664714962367 lineto
2.64 0 rlineto
147.84 303.827884275426 lineto
2.64 0 rlineto
150.48 305.693412892479 lineto
2.64 0 rlineto
153.12 301.904991125876 lineto
2.64 0 rlineto
155.76 304.166846652087 lineto
2.64 0 rlineto
158.4 299.869387323951 lineto
2.64 0 rlineto
161.04 295.974479718 lineto
2.64 0 rlineto
163.68 304.982472245708 lineto
2.64 0 rlineto
166.32 314.962361255733 lineto
2.64 0 rlineto
168.96 314.144319436241 lineto
2.64 0 rlineto
171.6 313.064612312404 lineto
2.64 0 rlineto
174.24 316.7647455245 lineto
2.64 0 rlineto
176.88 316.646189270238 lineto
2.64 0 rlineto
179.52 312.178724640213 lineto
2.64 0 rlineto
182.16 310.543077791777 lineto
2.64 0 rlineto
184.8 305.030120556885 lineto
2.64 0 rlineto
187.44 309.92952159116 lineto
2.64 0 rlineto
190.08 305.975541515596 lineto
2.64 0 rlineto
192.72 304.551995862612 lineto
2.64 0 rlineto
195.36 310.105438459321 lineto
2.64 0 rlineto
198 306.256403089729 lineto
2.64 0 rlineto
200.64 305.457329541546 lineto
2.64 0 rlineto
203.28 306.069302260886 lineto
2.64 0 rlineto
205.92 306.442945824295 lineto
2.64 0 rlineto
208.56 302.552547106769 lineto
2.64 0 rlineto
211.2 302.502972466524 lineto
2.64 0 rlineto
213.84 300.691596772879 lineto
2.64 0 rlineto
216.48 302.898473581638 lineto
2.64 0 rlineto
219.12 300.793617032689 lineto
2.64 0 rlineto
221.76 300.12749089045 lineto
2.64 0 rlineto
224.4 295.698615109266 lineto
2.64 0 rlineto
227.04 294.975619711258 lineto
2.64 0 rlineto
229.68 290.991670299872 lineto
2.64 0 rlineto
232.32 295.643295861612 lineto
2.64 0 rlineto
234.96 289.969876409932 lineto
2.64 0 rlineto
237.6 291.170266533752 lineto
2.64 0 rlineto
240.24 292.522818852234 lineto
2.64 0 rlineto
242.88 291.761930411345 lineto
2.64 0 rlineto
245.52 296.686084131113 lineto
2.64 0 rlineto
248.16 293.332014684832 lineto
2.64 0 rlineto
250.8 294.07414961027 lineto
2.64 0 rlineto
253.44 286.288248998643 lineto
2.64 0 rlineto
256.08 278.27622211351 lineto
2.64 0 rlineto
258.72 288.436243759721 lineto
2.64 0 rlineto
261.36 283.394262815084 lineto
2.64 0 rlineto
264 283.796871965643 lineto
2.64 0 rlineto
266.64 288.684166405104 lineto
2.64 0 rlineto
269.28 289.544236616415 lineto
2.64 0 rlineto
271.92 280.571467072119 lineto
2.64 0 rlineto
274.56 276.347245302155 lineto
2.64 0 rlineto
277.2 273.495338973735 lineto
2.64 0 rlineto
279.84 281.410921359263 lineto
2.64 0 rlineto
282.48 283.461544591767 lineto
2.64 0 rlineto
285.12 293.561303320757 lineto
2.64 0 rlineto
287.76 277.393312314094 lineto
2.64 0 rlineto
290.4 284.594396976471 lineto
2.64 0 rlineto
293.04 280.501001255769 lineto
2.64 0 rlineto
295.68 271.165443634899 lineto
2.64 0 rlineto
298.32 285.707092882008 lineto
2.64 0 rlineto
300.96 282.51294820817 lineto
2.64 0 rlineto
303.6 279.218847808608 lineto
2.64 0 rlineto
306.24 265.872544146692 lineto
2.64 0 rlineto
308.88 279.146840425415 lineto
2.64 0 rlineto
311.52 271.001515872902 lineto
2.64 0 rlineto
314.16 272.940846629675 lineto
2.64 0 rlineto
316.8 279.79194144471 lineto
2.64 0 rlineto
319.44 270.672365611016 lineto
2.64 0 rlineto
322.08 259.79607825629 lineto
2.64 0 rlineto
324.72 248.999729715759 lineto
2.64 0 rlineto
327.36 267.888672946223 lineto
2.64 0 rlineto
330 271.328942827095 lineto
2.64 0 rlineto
332.64 267.629356450028 lineto
2.64 0 rlineto
335.28 265.335730503921 lineto
2.64 0 rlineto
337.92 258.205190425428 lineto
2.64 0 rlineto
340.56 274.356871019777 lineto
2.64 0 rlineto
343.2 272.861230571316 lineto
2.64 0 rlineto
345.84 273.020361459705 lineto
2.64 0 rlineto
348.48 258.305815395478 lineto
2.64 0 rlineto
351.12 252.184190973601 lineto
2.64 0 rlineto
353.76 249.811175460794 lineto
2.64 0 rlineto
356.4 263.048042904335 lineto
2.64 0 rlineto
359.04 258.104403287749 lineto
2.64 0 rlineto
361.68 264.884838821885 lineto
2.64 0 rlineto
364.32 271.001515872902 lineto
2.64 0 rlineto
366.96 262.674120083983 lineto
2.64 0 rlineto
369.6 250.384400421749 lineto
2.64 0 rlineto
372.24 262.486316923647 lineto
2.64 0 rlineto
374.88 248.531275050487 lineto
2.64 0 rlineto
377.52 255.740303682629 lineto
2.64 0 rlineto
380.16 252.294976485999 lineto
2.64 0 rlineto
382.8 248.648718099826 lineto
2.64 0 rlineto
385.44 247.224632155132 lineto
2.64 0 rlineto
388.08 248.765941012112 lineto
2.64 0 rlineto
390.72 253.825713176751 lineto
2.64 0 rlineto
393.36 232.998925926541 lineto
2.64 0 rlineto
396 251.065406120894 lineto
2.64 0 rlineto
398.64 243.896680645005 lineto
2.64 0 rlineto
401.28 230.696638751227 lineto
2.64 0 rlineto
403.92 225.141276296795 lineto
2.64 0 rlineto
406.56 219.23196962491 lineto
2.64 0 rlineto
409.2 227.488837912821 lineto
2.64 0 rlineto
411.84 178.278638850547 lineto
2.64 0 rlineto
414.48 254.148909789584 lineto
2.64 0 rlineto
417.12 231.008551644164 lineto
2.64 0 rlineto
419.76 233.149439610251 lineto
2.64 0 rlineto
422.4 219.419491220865 lineto
2.64 0 rlineto
425.04 222.879557575846 lineto
2.64 0 rlineto
427.68 229.433193650946 lineto
2.64 0 rlineto
430.32 240.782091542743 lineto
2.64 0 rlineto
432.96 253.609317094425 lineto
2.64 0 rlineto
435.6 248.765941012112 lineto
2.64 0 rlineto
438.24 244.023148646434 lineto
2.64 0 rlineto
440.88 261.15566235382 lineto
2.64 0 rlineto
443.52 240.915010626561 lineto
2.64 0 rlineto
446.16 239.027932810058 lineto
2.64 0 rlineto
448.8 245.521146144 lineto
2.64 0 rlineto
451.44 250.725830234657 lineto
2.64 0 rlineto
454.08 240.915010626561 lineto
2.64 0 rlineto
456.72 237.504219654548 lineto
2.64 0 rlineto
stroke
newpath
1.2 setlinewidth
[ ] 0 setdash
0 319.780273193774 moveto
31.68 319.780273193774 lineto
31.68 316.411709192893 lineto
63.36 316.411709192893 lineto
63.36 315.833322879407 lineto
95.04 315.833322879407 lineto
95.04 314.394274796158 lineto
126.72 314.394274796158 lineto
126.72 309.372867309451 lineto
158.4 309.372867309451 lineto
158.4 309.826674431188 lineto
190.08 309.826674431188 lineto
190.08 304.579987092835 lineto
221.76 304.579987092835 lineto
221.76 293.974758321838 lineto
253.44 293.974758321838 lineto
253.44 282.994690991647 lineto
285.12 282.994690991647 lineto
285.12 279.062726888331 lineto
316.8 279.062726888331 lineto
316.8 267.989228575504 lineto
348.48 267.989228575504 lineto
348.48 258.456449925297 lineto
380.16 258.456449925297 lineto
380.16 241.157964299358 lineto
411.84 241.157964299358 lineto
411.84 237.818922945728 lineto
443.52 237.818922945728 lineto
443.52 242.596193104516 lineto
459.36 242.596193104516 lineto
stroke
newpath
1.5 setlinewidth
[ ] 0 setdash
/Symbol findfont [ 6 0 0 6 0 0 ] makefont setfont
newpath
1.2 setlinewidth
[ ] 0 setdash
445.236 230.422293988214 moveto
445.236 230.422293988214 moveto
-1.2 -3 rmoveto
(\321) show
445.236 230.422293988214 moveto
stroke
/Symbol findfont [ 5.5 0 0 5.5 0 0 ] makefont setfont
newpath
1.5 setlinewidth
[ ] 0 setdash
grestore
90 rotate
/Times-Bold findfont [ 4.7 0 0 4.7 0 0 ] makefont setfont
-573 -190.79 -573 (ACQUIRED FROM SPRING ) stringwidth pop add 2 add -185.59 0 1 0.01 FillRectangle
-572 -189.79 moveto
(ACQUIRED FROM SPRING ) show
-573 -206.63 -573 (RUN FLOWING GRADIENT ) stringwidth pop add 2 add -201.43 0 1 0.01 FillRectangle
-572 -205.63 moveto
(RUN FLOWING GRADIENT ) show
-90 rotate
/Times-Bold findfont [ 9 0 0 9 0 0 ] makefont setfont
424.8 -598.5 moveto
(TIME \(years\)) CenterString
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
21.6 -151.2 moveto
(GAS \(mcf/mo\)) show
76.6 -149.2 moveto
/Symbol findfont [ 8 0 0 8 0 0 ] makefont setfont
-1.6 -4 rmoveto
(\321) show
0.8 setlinewidth
newpath
76.6 -149.2 moveto
5 0 rlineto
0 -4 rlineto
5 0 rlineto
0 8 rlineto
5 0 rlineto
0 -4 rlineto
5 0 rlineto
stroke
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
21.6 -163.2 moveto
(OIL \(bbls/mo\)) show
76.6 -161.2 moveto
/Symbol findfont [ 8 0 0 8 0 0 ] makefont setfont
-2.4 -2.4 rmoveto
(\104) show
1.5 setlinewidth
[ ] 0 setdash
newpath
76.6 -163.2 moveto
20 0 rlineto
stroke
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
108 -598.4 moveto
(08 / 29 / 2011) show
160.8 -598.4 moveto
(12 : 27 : 03) show
213.6 -598.4 moveto
(LAPP 1.0.10.81) show
266.4 -598.4 moveto
() show
319.2 -598.4 moveto
() show
372 -598.4 moveto
() show
477.6 -598.4 moveto
() RightString
530.4 -598.4 moveto
(03083100440000) RightString
583.2 -598.4 moveto
() RightString
636 -598.4 moveto
(PROD_ENG) RightString
708.8 -598.4 moveto
(CONVENTIONAL) RightString
741.6 -598.4 moveto
(500100) RightString
showpage
grestore
gsave
<</Orientation 3>> setpagedevice
90 rotate
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
504 -54 moveto
(Page    1) show
551 -126 moveto
(QUAL) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -53.1 moveto
() show
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
0 setgray
108 -55 moveto
(Well:  ACEE  1-19) show
108 -65 moveto
(DB_ID:  500100 ) show
108 -75 moveto
(DBS:  ARIES.OPZCHDB \(\)) show
108 -95 moveto
(Titles) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -105.1 moveto
(ACEE  1-19) show
108 -114.2 moveto
(AETNA  \(BARTON R\)) show
108 -123.3 moveto
(ARKANSAS, LOGAN) show
108 -132.4 moveto
(ARKOMA - OPERATED) show
108 -141.5 moveto
(PDP   \(BASE\)   19  8N 26W) show
108 -150.6 moveto
( ) show
108 -159.7 moveto
(DB # 500100    ACCT # 100102) show
108 -168.8 moveto
(OPERATOR: XTO ENERGY           ENG: VJG) show
108 -177.9 moveto
(OIL_PRI: 75.88  GAS_PRI: 3.51  NGL_PRI:) show
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -197.9 moveto
(Miscellaneous) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -208 moveto
(WELLS) show
212 -208 moveto
(0) RightString
264 -208 moveto
(1) RightString
576 -208 moveto
( ) RightString
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -228 moveto
(Production) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -238.1 moveto
(START) show
108 -247.2 moveto
(GAS) show
212 -238.1 moveto
(01/2011) RightString
212 -247.2 moveto
(400) RightString
264 -247.2 moveto
(NL) RightString
316 -247.2 moveto
(M/M) RightString
368 -247.2 moveto
(X) RightString
420 -247.2 moveto
(YRS) RightString
472 -247.2 moveto
(EXP) RightString
524 -247.2 moveto
(10) RightString
576 -238.1 moveto
( ) RightString
576 -247.2 moveto
( ) RightString
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -267.2 moveto
(Prices) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -277.3 moveto
(PRI/OIL) show
108 -286.4 moveto
(PRI/GAS) show
212 -277.3 moveto
(@M.PRIOIL) RightString
212 -286.4 moveto
(@M.PRIGAS) RightString
576 -277.3 moveto
( ) RightString
576 -286.4 moveto
( ) RightString
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -306.4 moveto
(Expenses) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -316.5 moveto
(OPC/W) show
108 -325.6 moveto
(OPC/W) show
108 -334.7 moveto
(ATX) show
108 -343.8 moveto
(STX/OIL) show
108 -352.9 moveto
(STX/GAS) show
212 -316.5 moveto
(556) RightString
212 -325.6 moveto
(813) RightString
212 -334.7 moveto
(.474) RightString
212 -343.8 moveto
(5.00) RightString
212 -352.9 moveto
(1.25) RightString
264 -334.7 moveto
(.474) RightString
264 -343.8 moveto
(5.00) RightString
264 -352.9 moveto
(1.25) RightString
316 -334.7 moveto
(%) RightString
316 -343.8 moveto
(%) RightString
316 -352.9 moveto
(%) RightString
576 -316.5 moveto
( ) RightString
576 -325.6 moveto
( ) RightString
576 -334.7 moveto
( ) RightString
576 -343.8 moveto
( ) RightString
576 -352.9 moveto
( ) RightString
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -372.9 moveto
(Ownership) show
/Times-Roman findfont [ 9 0 0 9 0 0 ] makefont setfont
108 -383 moveto
(NET) show
212 -383 moveto
(100.00000) RightString
264 -383 moveto
(85.87514) RightString
316 -383 moveto
(85.87514) RightString
368 -383 moveto
(%) RightString
576 -383 moveto
( ) RightString
/Times-Bold findfont [ 10 0 0 10 0 0 ] makefont setfont
108 -403 moveto
(Investments) show
108 -424 moveto
(Overlays) show
/Times-Roman findfont [ 6 0 0 6 0 0 ] makefont setfont
109.5 -577.8 moveto
() show
226.5 -577.8 moveto
() show
460.5 -577.8 moveto
() RightString
577.5 -577.8 moveto
(ACEE  1-19) RightString
109.5 -584.8 moveto
(08 / 29 / 2011) show
168 -584.8 moveto
(12 : 27 : 03) show
226.5 -584.8 moveto
(LAPP 1.0.10.81) show
285 -584.8 moveto
(03083100440000) show
402 -584.8 moveto
(PROD_ENG) RightString
460.5 -584.8 moveto
(ARKSPLI00001) RightString
519 -584.8 moveto
(CONVENTIONAL) RightString
577.5 -584.8 moveto
(500100) RightString
showpage
grestore

% XTO.Reporting.PostScript.PsIncludes.PsFooter
clear

This topic has been closed for replies.
Correct answer abeddie

That didn't work.  File printed in simplex.


I really suspected the last setpagedevice in the file that is on page 2.

setpagedevice and how duplex are device dependent and your file printed in duplex on my printer.

I suggest you start with the the simple working duplex code and add parts of your file in e.g. add

all of the procedures and page 1 of your file except the setpagedevice and keep setpagedevice

and page 2 of the simple working duplex file. If it is still simplex cut out a chunk of page 1. If it is

duplex then the problem is page 2.

1 reply

Participating Frequently
August 30, 2011

I tried file on a printer here and duplex and numcopies worked,
There are a few things about the file such as gsave grestore
in the middle of setpagedevice calls and after showpage
and the setpagedevice on page 2 that may need some checking.

Try this simple test below and make sure your printer works
in duplex with setpagedevice. If it does not it may be a
printer setting or the delivery method such as CUPS.

%!
<<
  /Duplex true
>> setpagedevice

/Courier 72 selectfont
72 648 moveto
(PAGE 1) show
showpage

72 648 moveto
(PAGE 2) show
showpage

Participating Frequently
August 30, 2011

abeddie,

The test file worked.  "Page 1" printed on one side and "Page 2" on the reverse.

What tips can you give me about placement of gsave, grestore and showpage relative to the setpagedevice calls?  I have reviewed what postscript documentation I could find, but I am relatively new to postscript.  What is the suggested order of these calls?

Thank you.