<font size=2 face="sans-serif">In one of our print jobs most statements
are one duplex-page long but some occassionally go to a second-page (or
more). &nbsp;The first page of a statement is printed on one stock and
any accompanying pages are printed on different stock. &nbsp;Our printers
are set up such that &quot;white&quot; is associated with the first stock
and &quot;blue&quot; is associated the other. &nbsp;The colours, of course,
are arbitrary names to distinguish the trays.</font>
<br>
<br><font size=2 face="sans-serif">The way we currently handle this is
to post-process the PostScript produced by XEP. &nbsp;We inject the following
commands between %%BeginPageSetup and SafeSetPageDevice</font>
<br>
<br><font size=2 face="sans-serif">%%PageMedia: Color Weight Type &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">&lt;&lt;/MediaColor(white)/MediaWeight
0/MediaType()&gt;&gt; setpagedevice</font>
<br>
<br>
<br><font size=2 face="sans-serif">So a stream of pages would look something
like this:</font>
<br><font size=2 face="sans-serif">... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">%%Page: 1 1 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">%%BeginPageSetup &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">%%PageMedia: Color Weight Type &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">&lt;&lt;/MediaColor(white)/MediaWeight
0/MediaType()&gt;&gt; setpagedevice </font>
<br><font size=2 face="sans-serif">XEPPS_DocumentPageDevice SafeSetPageDevice
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">%%EndPageSetup &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">%%Page: 3 3 &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="sans-serif">%%BeginPageSetup &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">%%PageMedia: Color Weight Type &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">&lt;&lt;/MediaColor(blue)/MediaWeight
0/MediaType()&gt;&gt; setpagedevice &nbsp;</font>
<br><font size=2 face="sans-serif">XEPPS_DocumentPageDevice SafeSetPageDevice
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">%%EndPageSetup &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="sans-serif">... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;</font>
<br>
<br>
<br><font size=2 face="sans-serif">In our upcoming release we are seeking
to move away from post-processing the PostScript, rather to modifty the
XEPOUT and have have XEP inject the MediaColor. &nbsp;For the most part
this works well:</font>
<br>
<br><font size=2 face="sans-serif">XEPOUT snippet:</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;xep:page width=&quot;612000&quot;
height=&quot;792000&quot; page-number=&quot;1&quot; page-id=&quot;1&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;?xep-postscript-page-device
/InputAttributes &lt;&lt;/MediaColor(white)/MediaWeight 0/MediaType()&gt;&gt;?&gt;...</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&nbsp; &lt;xep:page width=&quot;612000&quot;
height=&quot;792000&quot; page-number=&quot;3&quot; page-id=&quot;3&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;?xep-postscript-page-device
/InputAttributes &lt;&lt;/MediaColor(blue)/MediaWeight 0/MediaType()&gt;&gt;?&gt;</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br><font size=2 face="sans-serif">I copied the xep-postscript-page-device
directive from another xep-support request. &nbsp;This produces PostScript
that looks like this</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">%%Page: 1 1</font>
<br><font size=2 face="sans-serif">%%BeginPageSetup</font>
<br><font size=2 face="sans-serif">XEPPS_DocumentPageDevice dup length
dict copy</font>
<br><font size=2 face="sans-serif">dup /InputAttributes &lt;&lt;/MediaColor(white)/MediaWeight
0/MediaType()&gt;&gt; put</font>
<br><font size=2 face="sans-serif">SafeSetPageDevice</font>
<br><font size=2 face="sans-serif">%%EndPageSetup</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">%%Page: 3 3</font>
<br><font size=2 face="sans-serif">%%BeginPageSetup</font>
<br><font size=2 face="sans-serif">XEPPS_DocumentPageDevice dup length
dict copy</font>
<br><font size=2 face="sans-serif">dup /InputAttributes &lt;&lt;/MediaColor(blue)/MediaWeight
0/MediaType()&gt;&gt; put</font>
<br><font size=2 face="sans-serif">SafeSetPageDevice</font>
<br><font size=2 face="sans-serif">%%EndPageSetup</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br><font size=2 face="sans-serif">In both cases we inject the MediaColor
only when necessary. &nbsp;That is we only add the &quot;switch command&quot;
on page one, and thereafter only if &quot;this page&quot; is to be on different
stock than &quot;last page&quot;. </font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">So here's our problem: &nbsp;Our current
technique works fine. &nbsp;The technique used in the upcoming release
behaves incorrectly. &nbsp;The first switch to &quot;white&quot; is ignored
for that page. &nbsp;All subsequent and contiguous pages that should be
&quot;white&quot; are correctly &quot;white&quot; &nbsp;Until we switch
to &quot;blue&quot; &nbsp;The switch to &quot;blue&quot; always works correctly.
&nbsp;But when we switch back to &quot;white&quot; it is again ignored
for that page and all subsequent and contiguous &quot;white&quot; pages
are correctly &quot;white&quot;</font>
<br>
<br><font size=2 face="sans-serif">If a set of pages should be</font>
<br>
<br><font size=2 face="sans-serif">W W W B B W W B W B W W W</font>
<br>
<br><font size=2 face="sans-serif">instead it is </font>
<br><font size=2 face="sans-serif">B W W B B B W B B B B W W</font>
<br>
<br>
<br><font size=2 face="sans-serif">As is probably apparent, I am not literate
in PostScript. &nbsp;I can see the differences between what we do now and
what XEP emits. &nbsp;But it works 100% of the time for &quot;blue&quot;
and most of the time for &quot;white&quot; except for the first page of
a set of contiguous &quot;white&quot;.</font>
<br>
<br><font size=2 face="sans-serif">Can anyone guide me on how to modify
the XEPOUT to correct this?</font>
<br>
<br><BR>
<BR>
<BR>
This e-mail is confidential, intended solely for the use of the<BR>
recipient(s) to whom it was addressed. If you have received it<BR>
in error, please do not copy or distribute this e-mail. We ask<BR>
that you notify us immediately by replying to the sender and<BR>
then delete this e-mail. E-mail sent or received over the<BR>
internet may not be secure. You should use caution when sending<BR>
e-mail messages containing private and confidential information<BR>
or consider other secure means to send the information. If you<BR>
have any questions regarding the authenticity or security of<BR>
the e-mail you have received please do not hesitate to contact<BR>
us at 1-800-265-5615.<BR>
<BR>
<BR>
Ce message de courriel est confidentiel et s’adresse uniquement<BR>
à la personne indiquée.  Si vous l’avez reçu par erreur,<BR>
veuillez ne pas copier ni distribuer ce message de courriel.<BR>
Nous vous demandons de nous aviser immédiatement en répondant à<BR>
l’expéditeur, puis en supprimant ce message.  Les messages<BR>
envoyés ou reçus par courriel pourraient ne pas être sécurisés.<BR>
Vous devriez être prudent lorsque vous envoyez des messages de<BR>
courriel contenant des renseignements confidentiels et privés<BR>
ou songer à prendre d’autres moyens sécurisés pour envoyer les<BR>
renseignements.  Si vous avez des questions concernant<BR>
l’authenticité ou la sécurité d’un courriel que vous avez reçu,<BR>
n’hésitez pas à communiquer avec nous au 1 800 265-5615.<BR>

!DSPAM:87,4da3440763738929614421!