[xep-support] Tray switching inconsistent

From: <Michael.Ottoson@greenshield.ca>
Date: Mon Apr 11 2011 - 10:53:49 PDT

In one of our print jobs most statements are one duplex-page long but some occassionally go to a second-page (or more). The first page of a statement is printed on one stock and any accompanying pages are printed on different stock. Our printers are set up such that "white" is associated with the first stock and "blue" is associated the other. The colours, of course, are arbitrary names to distinguish the trays.

The way we currently handle this is to post-process the PostScript produced by XEP. We inject the following commands between %%BeginPageSetup and SafeSetPageDevice

%%PageMedia: Color Weight Type <</MediaColor(white)/MediaWeight 0/MediaType()>> setpagedevice

So a stream of pages would look something like this:
.. %%Page: 1 1 %%BeginPageSetup %%PageMedia: Color Weight Type <</MediaColor(white)/MediaWeight 0/MediaType()>> setpagedevice XEPPS_DocumentPageDevice SafeSetPageDevice %%EndPageSetup ... %%Page: 3 3 %%BeginPageSetup %%PageMedia: Color Weight Type <</MediaColor(blue)/MediaWeight 0/MediaType()>> setpagedevice XEPPS_DocumentPageDevice SafeSetPageDevice %%EndPageSetup ...

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. For the most part this works well:

XEPOUT snippet:
..
  <xep:page width="612000" height="792000" page-number="1" page-id="1">
    <?xep-postscript-page-device /InputAttributes <</MediaColor(white)/MediaWeight 0/MediaType()>>?>...
..
  <xep:page width="612000" height="792000" page-number="3" page-id="3">
    <?xep-postscript-page-device /InputAttributes <</MediaColor(blue)/MediaWeight 0/MediaType()>>?>
..

I copied the xep-postscript-page-device directive from another xep-support request. This produces PostScript that looks like this
..
%%Page: 1 1
%%BeginPageSetup
XEPPS_DocumentPageDevice dup length dict copy
dup /InputAttributes <</MediaColor(white)/MediaWeight 0/MediaType()>> put
SafeSetPageDevice
%%EndPageSetup
..
%%Page: 3 3
%%BeginPageSetup
XEPPS_DocumentPageDevice dup length dict copy
dup /InputAttributes <</MediaColor(blue)/MediaWeight 0/MediaType()>> put
SafeSetPageDevice
%%EndPageSetup
..

In both cases we inject the MediaColor only when necessary. That is we only add the "switch command" on page one, and thereafter only if "this page" is to be on different stock than "last page".

So here's our problem: Our current technique works fine. The technique used in the upcoming release behaves incorrectly. The first switch to "white" is ignored for that page. All subsequent and contiguous pages that should be "white" are correctly "white" Until we switch to "blue" The switch to "blue" always works correctly. But when we switch back to "white" it is again ignored for that page and all subsequent and contiguous "white" pages are correctly "white"

If a set of pages should be

W W W B B W W B W B W W W

instead it is B W W B B B W B B B B W W

As is probably apparent, I am not literate in PostScript. I can see the differences between what we do now and what XEP emits. But it works 100% of the time for "blue" and most of the time for "white" except for the first page of a set of contiguous "white".

Can anyone guide me on how to modify the XEPOUT to correct this?

This e-mail is confidential, intended solely for the use of the
recipient(s) to whom it was addressed. If you have received it
in error, please do not copy or distribute this e-mail. We ask
that you notify us immediately by replying to the sender and
then delete this e-mail. E-mail sent or received over the
internet may not be secure. You should use caution when sending
e-mail messages containing private and confidential information
or consider other secure means to send the information. If you
have any questions regarding the authenticity or security of
the e-mail you have received please do not hesitate to contact
us at 1-800-265-5615.

Ce message de courriel est confidentiel et s’adresse uniquement
à la personne indiquée. Si vous l’avez reçu par erreur,
veuillez ne pas copier ni distribuer ce message de courriel.
Nous vous demandons de nous aviser immédiatement en répondant à
l’expéditeur, puis en supprimant ce message. Les messages
envoyés ou reçus par courriel pourraient ne pas être sécurisés.
Vous devriez être prudent lorsque vous envoyez des messages de
courriel contenant des renseignements confidentiels et privés
ou songer à prendre d’autres moyens sécurisés pour envoyer les
renseignements. Si vous avez des questions concernant
l’authenticité ou la sécurité d’un courriel que vous avez reçu,
n’hésitez pas à communiquer avec nous au 1 800 265-5615.

!DSPAM:87,4da3440763738929614421!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Mon Apr 11 11:10:35 2011

This archive was generated by hypermail 2.1.8 : Mon Apr 11 2011 - 11:10:36 PDT