Commit 5a3bf5eb authored by Martin Mareš's avatar Martin Mareš
Browse files

Melusine: Working PPD

parent 07094707
#!/usr/bin/perl
use strict;
use warnings;
use common::sense;
use Getopt::Long;
use lib ".";
use PPD;
......@@ -9,6 +9,16 @@ use PPD::PJL;
use PPD::Paper;
use PPD::Common;
my $opt_gray;
my $opt_ps;
GetOptions(
'gray' => \$opt_gray,
'ps' => \$opt_ps,
) and @ARGV == 0 or die <<AMEN ;
Usage: $0 [--gray] [--ps]
AMEN
set('FileVersion', '1.0');
set('PCFileName', 'XRAL8135.PPD');
......@@ -20,10 +30,16 @@ set('Throughput', 35);
set('TTRasterizer', 'Type42');
set('Protocols', 'PJL BCP TBCP');
set('cupsFilter', ['application/vnd.cups-pdf 0 xerox-xcpt', 'application/vnd.cups-postscript 0 xerox-xcpt']);
if ($opt_ps) {
set('cupsFilter', 'application/vnd.cups-postscript 0 xerox-xcpt');
} else {
set('cupsFilter', ['application/vnd.cups-pdf 0 xerox-xcpt', 'application/vnd.cups-postscript 0 xerox-xcpt']);
}
set('ColorDevice', 1);
set('DefaultColorSpace', 'CMYK');
unless ($opt_gray) {
set('ColorDevice', 1);
set('DefaultColorSpace', 'CMYK');
}
define_ui_group({ Key => 'Basic', Name => 'Basic options' });
......@@ -191,8 +207,8 @@ option({
{ Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('OUTPUT', 'automatic') },
{ Key => 'Middle', Name => 'Center Tray', PS => jopt('OUTPUT', 'center') },
{ Key => 'Left', Name => 'Left Top Tray', PS => jopt('OUTPUT', 'left') },
{ Key => 'RightTop', Name => 'Right Top Tray', PS => jopt('OUTPUT', 'right-top') },
{ Key => 'RightMiddle', Name => 'Right Middle Tray', PS => jopt('OUTPUT', 'right-middle') },
{ Key => 'CenterTop', Name => 'Right Top Tray', PS => jopt('OUTPUT', 'center-top') },
{ Key => 'CenterBottom', Name => 'Right Middle Tray', PS => jopt('OUTPUT', 'center-bottom') },
],
});
......@@ -233,7 +249,7 @@ option({
Priority => 70,
JCL => 1,
Values => [
{ Key => 'Color', Name => 'Color', PS => jopt('COLOR', 'color') },
($opt_gray ? () : { Key => 'Color', Name => 'Color', PS => jopt('COLOR', 'color') }),
{ Key => 'Mono', Name => 'Monochromatic', PS => jopt('COLOR', 'mono') },
],
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment