Editing a PostScript File

Sep 1, 2014 at 6:33 PM
I need to be able to edit a PostScript file, in order to change the output printer tray manually. This library looks like it might be able to assist with that. Any chance you could point me in the right direction? Thanks!
Sep 17, 2014 at 2:21 PM
Hi,

Maby i can give you a direction. I have done this in the past for some automatic printing, by modifying the source PostScript file. Condition is that the printer must support postscript language. And for any printer this could be different, i don't know exactly.

With .NET i modify the source Postscript file and add this line to send the postscript to a specific tray:
(printerinfo trayselect 5 = lade 3)=string FieryXJdict /ExtCmdGetExec get exec {pop} if

or:
%%BeginFeature:
%%+ *InputSlot Drawer1
<</InputAttributes <</Priority [1]>> >> setpagedevice
%%EndFeature

This is an example for an Canon printer.

This is working for an plain HP laserprinter:
tray 1:
%%BeginFeature: *InputSlot ManualFeedTray/ Tray
<</ManualFeed false /MediaPosition 3>> setpagedevice
%%EndFeature

tray 2:
%%BeginFeature: *InputSlot Tray2
<</ManualFeed false /MediaPosition 0>> setpagedevice
%%EndFeature

tray 3:
%%BeginFeature: *InputSlot Tray3_500
<</ManualFeed false /MediaPosition 1>> setpagedevice
%%EndFeature

tray 4:
%%BeginFeature: *InputSlot Tray4_500
<</ManualFeed false /MediaPosition 4>> setpagedevice
%%EndFeature

try to put this right behind this line: %!PS-Adobe-3.0

regards,
Sil
Sep 17, 2014 at 2:46 PM

Awesome! Thanks!

Joseph Reynolds

Senior Software Developer and Software Architect

Microsoft C# MVP

Notice: This e-mail message is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. If you are the intended recipient but do not wish to receive communications through this medium, please so advise the sender immediately.