This directory contains a set of transforms for selecting paper trays on a variety of PostScript
printed on non-Canon PostScript printers.

The transforms were created from the printers' PPDs. We have tried to make the transforms as
general as possible by naming each one to match on as many printer models as possible that use the
same tray selection commands.

Each transform ends in .type.transform as they are named to match on printer model.

These transforms map pc-win paper trays to the target printer's tray. If you want to adapt these
transforms for use with other source printers then you will need to modify their source printer's
paper tray detection. One way to do this would be to write regular expressions to detect the source
printer's trays

e.g. In "sharp .type.transform" you can see that pagedevice MediaPosition 0, 1, 4, 5 correspond to
pc-win Tray 1, 2, 3, 4 which use MediaPosition 0, 1, 2, 3

sharp .type.transform
=====================
# pc-win Tray 1
IF media_pos == 0 THEN input_slot = """
    <</DeferredMediaSelection true /MediaPosition 0 /MediaType (None) /ManualFeed false>> setpagedevice
"""
# pc-win Tray 2
IF media_pos == 1 THEN input_slot = """
    <</DeferredMediaSelection true /MediaPosition 1 /MediaType (None) /ManualFeed false>> setpagedevice
"""
# pc-win Tray 3
IF media_pos == 2 THEN input_slot = """
    <</DeferredMediaSelection true /MediaPosition 4 /MediaType (None) /ManualFeed false>> setpagedevice
"""
# pc-win Tray 4
IF media_pos == 3 THEN input_slot = """
    <</DeferredMediaSelection true /MediaPosition 5 /MediaType (None) /ManualFeed false>> setpagedevice
"""

Therefore you could modify the tray decetion code in any of the non-Sharp transforms in this
directory

Proposed Transform
===================
# Extract Sharp pagedevice MediaPosition
IF /<<.{0,40}?\/MediaPosition\s*(\d+).{0,40}?>>\s*setpagedevice/ THEN media_pos = $1

# Map Sharp to pc-win MediaPosition
# 0, 1, 4, 5 =>  0, 1, 2, 3
IF media_pos >= 4 THEN media_pos = media_pos - 2

# Copy remainder of target transform
