Skip to content
Snippets Groups Projects
Commit 5a3bf5eb authored by Martin Mareš's avatar Martin Mareš
Browse files

Melusine: Working PPD

parent 07094707
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl #!/usr/bin/perl
use strict; use common::sense;
use warnings; use Getopt::Long;
use lib "."; use lib ".";
use PPD; use PPD;
...@@ -9,6 +9,16 @@ use PPD::PJL; ...@@ -9,6 +9,16 @@ use PPD::PJL;
use PPD::Paper; use PPD::Paper;
use PPD::Common; 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('FileVersion', '1.0');
set('PCFileName', 'XRAL8135.PPD'); set('PCFileName', 'XRAL8135.PPD');
...@@ -20,10 +30,16 @@ set('Throughput', 35); ...@@ -20,10 +30,16 @@ set('Throughput', 35);
set('TTRasterizer', 'Type42'); set('TTRasterizer', 'Type42');
set('Protocols', 'PJL BCP TBCP'); set('Protocols', 'PJL BCP TBCP');
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('cupsFilter', ['application/vnd.cups-pdf 0 xerox-xcpt', 'application/vnd.cups-postscript 0 xerox-xcpt']);
}
unless ($opt_gray) {
set('ColorDevice', 1); set('ColorDevice', 1);
set('DefaultColorSpace', 'CMYK'); set('DefaultColorSpace', 'CMYK');
}
define_ui_group({ Key => 'Basic', Name => 'Basic options' }); define_ui_group({ Key => 'Basic', Name => 'Basic options' });
...@@ -191,8 +207,8 @@ option({ ...@@ -191,8 +207,8 @@ option({
{ Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('OUTPUT', 'automatic') }, { Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('OUTPUT', 'automatic') },
{ Key => 'Middle', Name => 'Center Tray', PS => jopt('OUTPUT', 'center') }, { Key => 'Middle', Name => 'Center Tray', PS => jopt('OUTPUT', 'center') },
{ Key => 'Left', Name => 'Left Top Tray', PS => jopt('OUTPUT', 'left') }, { Key => 'Left', Name => 'Left Top Tray', PS => jopt('OUTPUT', 'left') },
{ Key => 'RightTop', Name => 'Right Top Tray', PS => jopt('OUTPUT', 'right-top') }, { Key => 'CenterTop', Name => 'Right Top Tray', PS => jopt('OUTPUT', 'center-top') },
{ Key => 'RightMiddle', Name => 'Right Middle Tray', PS => jopt('OUTPUT', 'right-middle') }, { Key => 'CenterBottom', Name => 'Right Middle Tray', PS => jopt('OUTPUT', 'center-bottom') },
], ],
}); });
...@@ -233,7 +249,7 @@ option({ ...@@ -233,7 +249,7 @@ option({
Priority => 70, Priority => 70,
JCL => 1, JCL => 1,
Values => [ 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') }, { Key => 'Mono', Name => 'Monochromatic', PS => jopt('COLOR', 'mono') },
], ],
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment