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

PPD: gen-nessie-xcpt and many fixes in modules

parent 1aeb72db
No related branches found
No related tags found
No related merge requests found
...@@ -132,17 +132,23 @@ sub get($) { ...@@ -132,17 +132,23 @@ sub get($) {
my ($key) = @_; my ($key) = @_;
my $kw = $keywords{$key}; my $kw = $keywords{$key};
if ($kw) { if ($kw) {
return $kw->{'Value'}; return $kw->{Value} // (defined $kw->{Values} ? $kw->{Values}[0] : undef);
} else { } else {
return; return;
} }
} }
# set("option", value) [must be already declared] # set("option", value) or set("option", [values]) [must be already declared]
sub set($$) { sub set($$) {
my ($key, $value) = @_; my ($key, $value) = @_;
my $k = $keywords{$key} or die "Unknown keyword $key (missing declaration)\n"; my $k = $keywords{$key} or die "Unknown keyword $key (missing declaration)\n";
if (ref $value) {
delete $k->{Value};
$k->{Values} = $value;
} else {
$k->{Value} = $value; $k->{Value} = $value;
delete $k->{Values};
}
} }
# maybe_set("option", value) [must be already declared] # maybe_set("option", value) [must be already declared]
...@@ -264,6 +270,7 @@ declare('d', ...@@ -264,6 +270,7 @@ declare('d',
# Group "c": CUPS options # Group "c": CUPS options
define_head_group({ Key => 'c', Name => 'CUPS options' }); define_head_group({ Key => 'c', Name => 'CUPS options' });
declare('c', declare('c',
[ 'cupsFilter', 's', undef ],
[ 'cupsProtocol', 's', undef ], [ 'cupsProtocol', 's', undef ],
); );
...@@ -272,6 +279,7 @@ define_head_group({ Key => 'j', Name => 'JCL options' }); ...@@ -272,6 +279,7 @@ define_head_group({ Key => 'j', Name => 'JCL options' });
declare('j', declare('j',
[ 'JCLBegin', 'q', undef ], [ 'JCLBegin', 'q', undef ],
[ 'JCLToPSInterpreter', 'q', undef ], [ 'JCLToPSInterpreter', 'q', undef ],
[ 'JCLToPDFInterpreter', 'q', undef ],
[ 'JCLEnd', 'q', undef ], [ 'JCLEnd', 'q', undef ],
); );
...@@ -303,9 +311,9 @@ sub format_value($$) { ...@@ -303,9 +311,9 @@ sub format_value($$) {
sub heading($) { sub heading($) {
my ($h) = @_; my ($h) = @_;
print "\n"; print "\n";
print "%* ", "=" x length $h, "\n"; print "*% ", "=" x length $h, "\n";
print "%* ", $h, "\n"; print "*% ", $h, "\n";
print "%* ", "=" x length $h, "\n"; print "*% ", "=" x length $h, "\n";
print "\n"; print "\n";
} }
...@@ -321,7 +329,7 @@ sub get_default($) { ...@@ -321,7 +329,7 @@ sub get_default($) {
sub emit_option($) { sub emit_option($) {
my ($o) = @_; my ($o) = @_;
my $key = $o->{Key}; my $key = $o->{Key};
print "%* === $key ===\n"; print "*% === $key ===\n";
my $jcl = ($o->{JCL} // ($key =~ /^JCL/)) ? "JCL" : ""; my $jcl = ($o->{JCL} // ($key =~ /^JCL/)) ? "JCL" : "";
if (defined $o->{Choice}) { if (defined $o->{Choice}) {
...@@ -331,7 +339,7 @@ sub emit_option($) { ...@@ -331,7 +339,7 @@ sub emit_option($) {
if (defined($o->{Choice}) || defined($o->{Priority}) || defined($o->{Section})) { if (defined($o->{Choice}) || defined($o->{Priority}) || defined($o->{Section})) {
my $pri = $o->{Priority} // 100; my $pri = $o->{Priority} // 100;
my $sec = $o->{Section} // ($jcl ? "JCLSetup" : "AnySetup"); my $sec = $o->{Section} // ($jcl ? "JCLSetup" : "AnySetup");
print '*', ((defined $o->{Choice}) ? "" : 'NonUI'), "OrderDependency $pri $sec *$key\n"; print '*', ((defined $o->{Choice}) ? "" : 'NonUI'), "OrderDependency: $pri $sec *$key\n";
} }
# Normal option # Normal option
...@@ -352,7 +360,7 @@ sub emit_option($) { ...@@ -352,7 +360,7 @@ sub emit_option($) {
print "\n"; print "\n";
} }
if (defined $o->{Choice}) { print "*${jcl}CloseUI *$key\n"; } if (defined $o->{Choice}) { print "*${jcl}CloseUI: *$key\n"; }
my $c = $o->{Custom}; my $c = $o->{Custom};
if ($c) { if ($c) {
...@@ -374,8 +382,11 @@ sub emit_keyword($) { ...@@ -374,8 +382,11 @@ sub emit_keyword($) {
my ($k) = @_; my ($k) = @_;
if ($k->{Type} eq 'o') { if ($k->{Type} eq 'o') {
emit_option($k); emit_option($k);
} elsif (defined $k->{Value}) { } elsif ($k->{Value} || $k->{Values}) {
print "*", $k->{Key}, ": ", format_value($k->{'Type'}, $k->{'Value'}), "\n"; my $vals = $k->{Values} // [ $k->{Value} ];
for my $t (@$vals) {
print "*", $k->{Key}, ": ", format_value($k->{Type}, $t), "\n";
}
} }
} }
...@@ -424,7 +435,7 @@ sub fill_defaults() { ...@@ -424,7 +435,7 @@ sub fill_defaults() {
sub check_missing() { sub check_missing() {
for my $key (keys %keywords) { for my $key (keys %keywords) {
my $k = $keywords{$key}; my $k = $keywords{$key};
if ($k->{Mandatory} && !defined $k->{Value}) { if ($k->{Mandatory} && !defined $k->{Value} && !defined $k->{Values}) {
die "Mandatory keyword $key not set\n"; die "Mandatory keyword $key not set\n";
} }
} }
......
...@@ -2,9 +2,11 @@ package PPD::PJL; ...@@ -2,9 +2,11 @@ package PPD::PJL;
use PPD; use PPD;
sub add_jcl() { sub add_jcl($) {
my $opt = $_[0] // {};
set('JCLBegin', '<1B>%-12345X@PJL<0A>'); set('JCLBegin', '<1B>%-12345X@PJL<0A>');
set('JCLToPSInterpreter', '@PJL ENTER LANGUAGE = POSTSCRIPT<0A>'); set('JCLToPSInterpreter', '@PJL ENTER LANGUAGE = POSTSCRIPT<0A>');
set('JCLToPDFInterpreter', '@PJL ENTER LANGUAGE = PDF<0A>') if $opt->{PDF};
set('JCLEnd', '<1B>%-12345X@PJL EOJ<0A><1B>%-12345X<0A>'); set('JCLEnd', '<1B>%-12345X@PJL EOJ<0A><1B>%-12345X<0A>');
} }
......
...@@ -19,22 +19,22 @@ my %media = ( ...@@ -19,22 +19,22 @@ my %media = (
'A4' => { Name => 'A4', W => mm(210), H => mm(297) }, 'A4' => { Name => 'A4', W => mm(210), H => mm(297) },
'A5' => { Name => 'A5', W => mm(148), H => mm(210) }, 'A5' => { Name => 'A5', W => mm(148), H => mm(210) },
'A6' => { Name => 'A6', W => mm(105), H => mm(148) }, 'A6' => { Name => 'A6', W => mm(105), H => mm(148) },
'B0' => { Name => 'B0', W => mm(1000), H => mm(1414) }, 'ISOB0' => { Name => 'B0', W => mm(1000), H => mm(1414) },
'B1' => { Name => 'B1', W => mm(707), H => mm(1000) }, 'ISOB1' => { Name => 'B1', W => mm(707), H => mm(1000) },
'B2' => { Name => 'B2', W => mm(500), H => mm(707) }, 'ISOB2' => { Name => 'B2', W => mm(500), H => mm(707) },
'B3' => { Name => 'B3', W => mm(353), H => mm(500) }, 'ISOB3' => { Name => 'B3', W => mm(353), H => mm(500) },
'B4' => { Name => 'B4', W => mm(250), H => mm(353) }, 'ISOB4' => { Name => 'B4', W => mm(250), H => mm(353) },
'B5' => { Name => 'B5', W => mm(176), H => mm(250) }, 'ISOB5' => { Name => 'B5', W => mm(176), H => mm(250) },
'B6' => { Name => 'B6', W => mm(125), H => mm(176) }, 'ISOB6' => { Name => 'B6', W => mm(125), H => mm(176) },
'C0' => { Name => 'C0', W => mm(917), H => mm(1297) }, 'EnvC0' => { Name => 'C0 Envelope', W => mm(917), H => mm(1297) },
'C1' => { Name => 'C1', W => mm(648), H => mm(917) }, 'EnvC1' => { Name => 'C1 Envelope', W => mm(648), H => mm(917) },
'C2' => { Name => 'C2', W => mm(458), H => mm(648) }, 'EnvC2' => { Name => 'C2 Envelope', W => mm(458), H => mm(648) },
'C3' => { Name => 'C3', W => mm(324), H => mm(458) }, 'EnvC3' => { Name => 'C3 Envelope', W => mm(324), H => mm(458) },
'C4' => { Name => 'C4', W => mm(229), H => mm(354) }, 'EnvC4' => { Name => 'C4 Envelope', W => mm(229), H => mm(324) },
'C5' => { Name => 'C5', W => mm(162), H => mm(229) }, 'EnvC5' => { Name => 'C5 Envelope', W => mm(162), H => mm(229) },
'C6' => { Name => 'C6', W => mm(114), H => mm(162) }, 'EnvC6' => { Name => 'C6 Envelope', W => mm(114), H => mm(162) },
'C7' => { Name => 'C7', W => mm(81), H => mm(114) }, 'EnvC7' => { Name => 'C7 Envelope', W => mm(81), H => mm(114) },
'C8' => { Name => 'C8', W => mm(57), H => mm(81) }, 'EnvC8' => { Name => 'C8 Envelope', W => mm(57), H => mm(81) },
'Letter' => { Name => 'US Letter', W => 612, H => 792 }, 'Letter' => { Name => 'US Letter', W => 612, H => 792 },
'Legal' => { Name => 'US Legal', W => 612, H => 1008 }, 'Legal' => { Name => 'US Legal', W => 612, H => 1008 },
); );
...@@ -47,6 +47,7 @@ my %media = ( ...@@ -47,6 +47,7 @@ my %media = (
# MarginH => pt, # Horizontal margin (default: 0) # MarginH => pt, # Horizontal margin (default: 0)
# MarginV => pt, # Vertical margin (default: 0) # MarginV => pt, # Vertical margin (default: 0)
# DefPaper => paper, # Default paper type (default: A4) # DefPaper => paper, # Default paper type (default: A4)
# JCL => 1, # Paper should be handled via JCL (default: 0)
# PSPageSize => PS, # PS code for setting PageSize (subroutine called with ref to media object) # PSPageSize => PS, # PS code for setting PageSize (subroutine called with ref to media object)
# PSPageRegion => PS, # The same for PageRegion (default: use PSPageSize) # PSPageRegion => PS, # The same for PageRegion (default: use PSPageSize)
# }) # })
...@@ -59,6 +60,7 @@ sub add_papers($) { ...@@ -59,6 +60,7 @@ sub add_papers($) {
my $maxh = $o->{MaxH} // 842; my $maxh = $o->{MaxH} // 842;
my $margh = $o->{MarginH} // 0; my $margh = $o->{MarginH} // 0;
my $margv = $o->{MarginV} // 0; my $margv = $o->{MarginV} // 0;
my $jcl = $o->{JCL} // 0;
my %real_media = (); my %real_media = ();
for my $p (keys %media) { for my $p (keys %media) {
my $m = $media{$p}; my $m = $media{$p};
...@@ -73,8 +75,9 @@ sub add_papers($) { ...@@ -73,8 +75,9 @@ sub add_papers($) {
option({ option({
Key => 'PageSize', Key => 'PageSize',
Name => 'Page Size', Name => 'Page Size',
Choice => 'PickAny', Choice => 'PickOne',
Priority => 20, Priority => 20,
JCL => $jcl,
Values => [ map { Values => [ map {
my $k = $_; my $k = $_;
my $m = $real_media{$_}; my $m = $real_media{$_};
...@@ -100,8 +103,9 @@ sub add_papers($) { ...@@ -100,8 +103,9 @@ sub add_papers($) {
option({ option({
Key => 'PageRegion', Key => 'PageRegion',
Name => 'Page Region', Name => 'Page Region',
Choice => 'PickAny', Choice => 'PickOne',
Priority => 21, Priority => 21,
JCL => $jcl,
Values => [ map { Values => [ map {
my $k = $_; my $k = $_;
my $m = $real_media{$_}; my $m = $real_media{$_};
......
#!/usr/bin/perl
# FIXME: Custom paper sizes
# FIXME: Precision of paper sizes
# FIXME: Paper orientation
use strict;
use warnings;
use lib ".";
use PPD;
use PPD::PJL;
use PPD::Paper;
use PPD::Common;
set('FileVersion', '1.0');
set('PCFileName', 'XRWC7845.PPD');
set('Manufacturer', 'Xerox');
set('Product', [ 'WorkCentre 7845', '(1.3.6.1.4.1.253.8.62.1.20.6.26.1.1)' ]);
set('PSVersion', '(3010.106) 3000');
set('Throughput', 45);
set('TTRasterizer', 'Type42');
set('Protocols', 'PJL BCP TBCP');
set('cupsFilter', 'application/vnd.cups-pdf 0 /aux/root/xcpt');
set('ColorDevice', 1);
set('DefaultColorSpace', 'CMYK');
# FIXME: Librarize
sub jopt {
my $out = "";
while (@_) {
my $key = shift @_;
my $val = shift @_;
$out .= sprintf('@PJL SET %s=%s<0A>', $key, $val);
}
return $out;
}
define_ui_group({ Key => 'Basic', Name => 'Basic options' });
option({
Key => 'Duplex',
Name => '2-Sided Printing',
Choice => 'PickOne',
Priority => 40,
JCL => 1,
Values => [
{ Key => 'None', Name => 'Off (1-Sided)', PS => jopt('SIDES', 'one-sided') },
{ Key => 'DuplexNoTumble', Name => 'Long-Edge Binding', PS => jopt('SIDES', 'two-sided-long-edge') },
{ Key => 'DuplexTumble', Name => 'Short-Edge Binding', PS => jopt('SIDES', 'two-sided-short-edge') },
]
});
option({
Key => 'Collate',
Choice => 'Boolean',
Priority => 41,
JCL => 1,
Values => [
{ Key => 'False', Name => 'Off', PS => jopt('COLLATE', 'uncollated') },
{ Key => 'True', Name => 'On', PS => jopt('COLLATE', 'collated'), Default => 1 },
]
});
option({
Key => 'XRPrivate',
Choice => 'Boolean',
Name => 'Private Job',
Priority => 59,
JCL => 1,
Values => [
{ Key => 'False', Name => 'Print normally', PS => jopt('PRIVATE', "") },
{ Key => 'True', Name => 'Private print-out (wait for the user to log in)', PS => jopt('PRIVATE', 'YES') },
],
});
PPD::PJL::add_jcl({ PDF => 1 });
PPD::Paper::add_papers({
MinW => 252, MaxW => 864,
MinH => 278, MaxH => 1368,
MarginH => 11.34, MarginV => 11.34, # FIXME: show as floats
JCL => 1,
PSPageSize => sub { my ($m) = @_; return jopt('MEDIAXSIZE', $m->{W}, 'MEDIAYSIZE', $m->{H}); },
# FIXME: LeadingEdge
});
switch_group('Media');
option({
Key => 'MediaType',
Name => 'Media Type',
Choice => 'PickOne',
Priority => 20,
JCL => 1,
Values => [
map { { Key => $_->[0], Name => $_->[1], PS => jopt('MEDIATYPE', $_->[2]) } }
(
[ 'AutoSelect', 'Automatically Select', 'use-ready' ],
[ 'SystemDefault', 'Printer Default', 'system-default' ],
[ 'Plain', 'Plain', 'stationery' ],
[ 'PlainReload', 'Plain Reloaded', 'stationery-reloaded' ],
[ 'Recycled', 'Recycled', 'stationery-recycled' ],
[ 'Punched', 'Punched', 'stationery-pre-punched' ],
[ 'Lightweight', 'Lightweight', 'stationery-lightweight' ],
[ 'LightweightCardStock', 'Lightweight Cardstock', 'cardstock-lightweight' ],
[ 'LightweightCardStockReloaded', 'Lightweight Cardstock Reloaded', 'cardstock-lightweight-reloaded' ],
[ 'CardStock', 'Cardstock', 'cardstock' ],
[ 'CardStockReloaded', 'Cardstock Reloaded', 'cardstock-reloaded', ],
[ 'HeavyweightCardstock', 'Heavyweight Cardstock', 'cardstock-heavyweight' ],
[ 'HeavyweightCardstockReloaded', 'Heavyweight Cardstock Reloaded', 'cardstock-heavyweight-reloaded' ],
[ 'LightweightGlossyCardStock', 'Lightweight Glossy Cardstock', 'cardstock-lightweight-glossy' ],
[ 'LightweightGlossyCardStockReloaded', 'Lightweight Glossy Cardstock Reloaded', 'cardstock-lightweight-glossy-reloaded' ],
[ 'GlossyCardStock', 'Glossy Cardstock', 'cardstock-glossy', ],
[ 'GlossyCardStockReloaded', 'Glossy Cardstock Reloaded', 'cardstock-glossy-reloaded', ],
[ 'HeavyweightGlossyCardstock', 'Heavyweight Glossy Cardstock', 'cardstock-heavyweight' ],
[ 'HeavyweightGlossyCardstockReloaded', 'Heavyweight Glossy Cardstock Reloaded', 'cardstock-heavyweight-reloaded' ],
[ 'PrePrinted', 'Pre-Printed', 'stationery-pre-printed' ],
[ 'Letterhead', 'Letterhead', 'stationery-letterhead' ],
[ 'Transparency', 'Transparency', 'transparency' ],
[ 'Bond', 'Bond', 'bond' ],
[ 'Labels', 'Labels', 'labels', ],
[ 'Envelopes', 'Envelope', 'envelope', ],
[ 'Custom1', 'Custom Type 1', 'custom1' ],
[ 'Custom2', 'Custom Type 2', 'custom2' ],
[ 'Custom3', 'Custom Type 3', 'custom3' ],
[ 'Custom4', 'Custom Type 4', 'custom4' ],
[ 'Custom5', 'Custom Type 5', 'custom5' ],
[ 'Custom6', 'Custom Type 6', 'custom6' ],
[ 'Custom7', 'Custom Type 7', 'custom7' ],
[ 'Other', 'Other Type', 'other' ],
)
],
Default => 'SystemDefault',
});
option({
Key => 'MediaColor',
Name => 'Media Color',
Choice => 'PickOne',
Priority => 21,
JCL => 1,
Values => [
map { { Key => $_->[0], Name => $_->[1], PS => jopt('MEDIACOLOR', $_->[2]) } }
(
[ 'SystemDefault', 'Printer Default', 'system-default' ],
[ 'Blue', 'Blue', 'blue' ],
[ 'Buff', 'Buff', 'buff' ],
[ 'Clear', 'Clear', 'no-color' ],
[ 'Goldenrod', 'Goldenrod', 'goldenrod' ],
[ 'Gray', 'Gray', 'gray' ],
[ 'Green', 'Green', 'green' ],
[ 'Ivory', 'Ivory', 'ivory' ],
[ 'Orange', 'Orange', 'orange' ],
[ 'Pink', 'Pink', 'pink' ],
[ 'Red', 'Red', 'red' ],
[ 'White', 'White', 'white' ],
[ 'Yellow', 'Yellow', 'yellow' ],
[ 'Custom1', 'Custom Color 1', 'custom1' ],
[ 'Custom2', 'Custom Color 2', 'custom2' ],
[ 'Custom3', 'Custom Color 3', 'custom3' ],
[ 'Custom4', 'Custom Color 4', 'custom4' ],
[ 'Custom5', 'Custom Color 5', 'custom5' ],
[ 'Custom6', 'Custom Color 6', 'custom6' ],
[ 'Custom7', 'Custom Color 7', 'custom7' ],
[ 'Other', 'Other Color', 'other' ],
)
],
Default => 'SystemDefault',
});
option({
Key => 'InputSlot',
Name => 'Input Slot',
Choice => 'PickOne',
Priority => 30,
JCL => 1,
Values => [
{ Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('INPUTTRAY', 'automatic'), Default => 1 },
{ Key => 'Tray1', Name => 'Tray 1', PS => jopt('INPUTTRAY', 'tray-1') },
{ Key => 'Tray2', Name => 'Tray 2', PS => jopt('INPUTTRAY', 'tray-2') },
{ Key => 'Tray3', Name => 'Tray 3', PS => jopt('INPUTTRAY', 'tray-3') },
{ Key => 'Tray4', Name => 'Tray 4', PS => jopt('INPUTTRAY', 'tray-4') },
{ Key => 'Tray5', Name => 'Tray 5 (Bypass)', PS => jopt('INPUTTRAY', 'tray-5') },
{ Key => 'ManualFeed', Name => 'Tray 5 (Bypass with manual feed)', PS => jopt('INPUTTRAY', 'manualfeed', 'TRAYFEED', 'manual-check') },
],
});
option({
Key => 'RequiresPageRegion',
Values => [{ Key => 'All', String => 'True' }],
Default => undef,
});
define_ui_group({ Key => 'Finishing', Name => 'Finishing' });
option({
Key => 'OutputBin',
Name => 'Paper Destination',
Choice => 'PickOne',
Priority => 50,
JCL => 1,
Values => [
{ Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('OUTPUT', 'automatic'), Default => 1 },
{ 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') },
],
});
option({
Key => 'Jog',
Name => 'Offset',
Choice => 'PickOne',
Priority => 51,
JCL => 1,
Values => [
{ Key => 'None', Name => 'No Offset', PS => jopt('OFFSET', 'none') },
{ Key => 'EndOfSet', Name => 'Each Set', PS => jopt('OFFSET', 'offset-set'), Default => 1 },
{ Key => 'EndOfJob', Name => 'Each Job', PS => jopt('OFFSET', 'offset-job') },
],
});
# FIXME
#option({
# Key => 'StapleLocation',
# Name => 'Stapling',
# Choice => 'PickOne',
# Priority => 55,
# Values => [
# { Key => 'None', Name => 'No Staple', PS => '<< /Staple 0 >> setpagedevice', Default => 1 },
# { Key => 'SinglePortrait', Name => '1 Staple (Portrait)',
# PS => '<< /Collate true /Staple 3 /StapleDetails << /Type 7 /Location 0 >> >> setpagedevice' },
# { Key => 'SingleLandscape', Name => '1 Staple (Landscape)',
# PS => '<< /Collate true /Staple 3 /StapleDetails << /Type 7 /Location 1 >> >> setpagedevice' },
# { Key => 'DualPortrait', Name => '2 Staples (Portrait)',
# PS => 'userdict /XRXShortEdgeFinishing known ' .
# '{ << /Collate true /Staple 3 /LeadingEdge 0 /StapleDetails << /Type 7 /Location 4 >> >> setpagedevice } ' .
# '{ << /Collate true /Staple 3 /LeadingEdge 1 /StapleDetails << /Type 7 /Location 6 >> >> setpagedevice } ifelse' },
# { Key => 'DualLandscape', Name => '2 Staples (Landscape)',
# PS => 'userdict /XRXShortEdgeFinishing known ' .
# '{ << /Collate true /Staple 3 /LeadingEdge 0 /StapleDetails << /Type 7 /Location 5 >> >> setpagedevice } ' .
# '{ << /Collate true /Staple 3 /LeadingEdge 1 /StapleDetails << /Type 7 /Location 6 >> >> setpagedevice } ifelse' },
# # FIXME: Set XRXShortEdgeFinishing
# ],
#});
# FIXME
#option({
# Key => 'XRFold',
# Name => 'Folding',
# Choice => 'PickOne',
# Priority => 56,
# Values => [
# { Key => 'None', Name => 'No Folding', PS => '<< /Fold 0 >> setpagedevice >>', Default => 1 },
# { Key => 'BiFold', Name => 'Booklet Fold',
# PS => '<< /Booklet true /OutputType (BOOKLET TRAY) /LeadingEdge 0 ' .
# '/BookletDetails << /Type 3 /StapleType 0 /PrintInside true /PageSet true >> ' .
# '>> setpagedevice' },
# { Key => 'BiFoldStaple', Name => 'Booklet Fold and Staple',
# PS => '<< /Booklet true /OutputType (BOOKLET TRAY) /LeadingEdge 0 ' .
# '/BookletDetails << /StapleType 1 /PrintInside true >> ' .
# '>> setpagedevice' },
# ],
#});
# FIXME: Update
#constrain(undef, 'InputSlot', 'MediaType', sub {
# my ($is, $mt) = @_;
# return !(($is eq 'Tray2' || $is eq 'Tray3') &&
# ($mt eq 'Labels' || $mt eq 'Envelope'));
#});
#constrain(undef, 'Duplex', 'MediaType', sub {
# my ($dp, $mt) = @_;
# return !($dp ne 'None' && $mt =~ /^(Labels|Transparency|Bond)$/);
#});
# FIXME: Replace by XRXMismatch
#option({
# Key => 'HPPaperPolicy',
# Name => 'Fit to Page',
# Choice => 'PickOne',
# Priority => 10,
# Values => [
# { Key => 'PromptUser', Name => 'PromptUser', PS => '', Default => 1 },
# { Key => 'NearestSizeAdjust', Name => 'Nearest Size and Scale', PS => '<< /Policies << /DeferredMediaSelection true /PageSize 3 >> >> setpagedevice' },
# { Key => 'NearestSizeNoAdjust', Name => 'Nearest Size and Crop', PS => '<< /Policies << /DeferredMediaSelection true /PageSize 5 >> >> setpagedevice' },
# ],
#});
define_ui_group({ Key => 'Quality', Name => 'Print Quality' });
option({
Key => 'XRColor',
Name => 'Color Printing',
Choice => 'PickOne',
Priority => 70,
JCL => 1,
Values => [
{ Key => 'Mono', Name => 'Monochromatic', PS => jopt('COLOR', 'mono'), Default => 1 },
{ Key => 'Color', Name => 'Color', PS => jopt('COLOR', 'color') },
],
});
# FIXME
#option({
# Key => 'XRImageQuality',
# Name => 'Image Quality',
# Choice => 'PickOne',
# Priority => 71,
# Values => [ map {
# { Key => ($_ > 0) ? "Lighten$_" : ($_ < 0) ? "Darken" . -$_ : "Normal",
# Name => ($_ > 0) ? "Lighten (+$_)" : ($_ < 0) ? "Darken ($_)" : "Normal",
# PS => "<< /DeviceRenderingInfo << /Brightness $_ >> >> setpagedevice",
# }
# } (-5..5)
# ],
#});
# FIXME
#option({
# Key => 'Resolution',
# Name => 'Printer Resolution',
# Choice => 'PickOne',
# Priority => 72,
# Values => [
# { Key => '600dpi', Name => '600 DPI (Fast)',
# PS => '<< /HWResolution [600 600] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice',
# Default => 1,
# },
# { Key => '1200dpi', Name => '1200 DPI (High Quality)',
# PS => '<< /HWResolution [1200 1200] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice'
# },
# ],
#});
# As reported by the printer (FIXME)
fonts( <<'AMEN' );
AlbertusMT-Italic: Standard "(001.001)" Standard ROM
AlbertusMT-Light: Standard "(001.001)" Standard ROM
AlbertusMT: Standard "(001.001)" Standard ROM
AntiqueOlive-Bold: Standard "(001.002)" Standard ROM
AntiqueOlive-Compact: Standard "(001.002)" Standard ROM
AntiqueOlive-Italic: Standard "(001.002)" Standard ROM
AntiqueOlive-Roman: Standard "(001.002)" Standard ROM
Apple-Chancery: Standard "(001.002)" ExtendedRoman ROM
Arial-BoldItalicMT: Standard "(001.003)" Standard ROM
Arial-BoldMT: Standard "(001.003)" Standard ROM
Arial-ItalicMT: Standard "(001.003)" Standard ROM
ArialMT: Standard "(001.003)" Standard ROM
AvantGarde-Book: Standard "(003.000)" Standard ROM
AvantGarde-BookOblique: Standard "(003.000)" Standard ROM
AvantGarde-Demi: Standard "(003.000)" Standard ROM
AvantGarde-DemiOblique: Standard "(003.000)" Standard ROM
Bodoni-Bold: Standard "(001.003)" Standard ROM
Bodoni-BoldItalic: Standard "(001.003)" Standard ROM
Bodoni-Italic: Standard "(001.003)" Standard ROM
Bodoni-Poster: Standard "(001.003)" Standard ROM
Bodoni-PosterCompressed: Standard "(001.002)" Standard ROM
Bodoni: Standard "(001.003)" Standard ROM
Bookman-Demi: Standard "(003.000)" Standard ROM
Bookman-DemiItalic: Standard "(003.000)" Standard ROM
Bookman-Light: Standard "(003.000)" Standard ROM
Bookman-LightItalic: Standard "(003.000)" Standard ROM
Carta: Special "(001.001)" Special ROM
Chicago: Standard "(001.000)" ExtendedRoman ROM
Clarendon-Bold: Standard "(001.002)" Standard ROM
Clarendon-Light: Standard "(001.002)" Standard ROM
Clarendon: Standard "(001.002)" Standard ROM
CooperBlack-Italic: Standard "(001.004)" Standard ROM
CooperBlack: Standard "(001.004)" Standard ROM
Copperplate-ThirtyThreeBC: Standard "(001.003)" Standard ROM
Copperplate-ThirtyTwoBC: Standard "(001.003)" Standard ROM
Coronet-Regular: Standard "(001.002)" Standard ROM
Courier-Bold: Standard "(004.000)" Standard ROM
Courier-BoldOblique: Standard "(004.000)" Standard ROM
Courier-Oblique: Standard "(004.000)" Standard ROM
Courier: Standard "(004.000)" Standard ROM
Eurostile-Bold: Standard "(001.002)" Standard ROM
Eurostile-BoldExtendedTwo: Standard "(001.003)" Standard ROM
Eurostile-ExtendedTwo: Standard "(001.003)" Standard ROM
Eurostile: Standard "(001.003)" Standard ROM
Geneva: Standard "(001.000)" ExtendedRoman ROM
GillSans-Bold: Standard "(001.002)" Standard ROM
GillSans-BoldCondensed: Standard "(001.002)" Standard ROM
GillSans-BoldItalic: Standard "(001.003)" Standard ROM
GillSans-Condensed: Standard "(001.002)" Standard ROM
GillSans-ExtraBold: Standard "(001.002)" Standard ROM
GillSans-Italic: Standard "(001.003)" Standard ROM
GillSans-Light: Standard "(001.002)" Standard ROM
GillSans-LightItalic: Standard "(001.003)" Standard ROM
GillSans: Standard "(001.003)" Standard ROM
Goudy-Bold: Standard "(001.003)" Standard ROM
Goudy-BoldItalic: Standard "(001.003)" Standard ROM
Goudy-ExtraBold: Standard "(001.002)" Standard ROM
Goudy-Italic: Standard "(001.003)" Standard ROM
Goudy: Standard "(001.004)" Standard ROM
Helvetica-Bold: Standard "(003.000)" Standard ROM
Helvetica-BoldOblique: Standard "(003.000)" Standard ROM
Helvetica-Condensed-Bold: Standard "(003.000)" Standard ROM
Helvetica-Condensed-BoldObl: Standard "(003.000)" Standard ROM
Helvetica-Condensed-Oblique: Standard "(003.000)" Standard ROM
Helvetica-Condensed: Standard "(003.000)" Standard ROM
Helvetica-Narrow-Bold: Standard "(003.000)" Standard ROM
Helvetica-Narrow-BoldOblique: Standard "(003.000)" Standard ROM
Helvetica-Narrow-Oblique: Standard "(003.000)" Standard ROM
Helvetica-Narrow: Standard "(003.000)" Standard ROM
Helvetica-Oblique: Standard "(003.000)" Standard ROM
Helvetica: Standard "(003.000)" Standard ROM
HoeflerText-Black: Standard "(001.000)" ExtendedRoman ROM
HoeflerText-BlackItalic: Standard "(001.000)" ExtendedRoman ROM
HoeflerText-Italic: Standard "(001.000)" ExtendedRoman ROM
HoeflerText-Ornaments: Special "(001.001)" Standard ROM
HoeflerText-Regular: Standard "(001.000)" ExtendedRoman ROM
JoannaMT-Bold: Standard "(001.001)" Standard ROM
JoannaMT-BoldItalic: Standard "(001.001)" Standard ROM
JoannaMT-Italic: Standard "(001.001)" Standard ROM
JoannaMT: Standard "(001.001)" Standard ROM
LetterGothic-Bold: Standard "(001.007)" Standard ROM
LetterGothic-BoldSlanted: Standard "(001.006)" Standard ROM
LetterGothic-Slanted: Standard "(001.005)" Standard ROM
LetterGothic: Standard "(001.005)" Standard ROM
LubalinGraph-Book: Standard "(001.004)" Standard ROM
LubalinGraph-BookOblique: Standard "(001.004)" Standard ROM
LubalinGraph-Demi: Standard "(001.004)" Standard ROM
LubalinGraph-DemiOblique: Standard "(001.004)" Standard ROM
Marigold: Standard "(001.001)" Standard ROM
MonaLisa-Recut: Standard "(001.001)" Standard ROM
Monaco: Standard "(001.001)" ExtendedRoman ROM
NewCenturySchlbk-Bold: Standard "(003.000)" Standard ROM
NewCenturySchlbk-BoldItalic: Standard "(003.000)" Standard ROM
NewCenturySchlbk-Italic: Standard "(003.000)" Standard ROM
NewCenturySchlbk-Roman: Standard "(003.000)" Standard ROM
NewYork: Standard "(001.000)" ExtendedRoman ROM
Optima-Bold: Standard "(001.007)" Standard ROM
Optima-BoldItalic: Standard "(001.001)" Standard ROM
Optima-Italic: Standard "(001.001)" Standard ROM
Optima: Standard "(001.006)" Standard ROM
Oxford: Standard "(001.001)" Standard ROM
Palatino-Bold: Standard "(003.000)" Standard ROM
Palatino-BoldItalic: Standard "(003.000)" Standard ROM
Palatino-Italic: Standard "(003.000)" Standard ROM
Palatino-Roman: Standard "(003.000)" Standard ROM
StempelGaramond-Bold: Standard "(001.003)" Standard ROM
StempelGaramond-BoldItalic: Standard "(001.003)" Standard ROM
StempelGaramond-Italic: Standard "(001.003)" Standard ROM
StempelGaramond-Roman: Standard "(001.003)" Standard ROM
Symbol: Special "(001.008)" Special ROM
Tekton: Standard "(001.002)" Standard ROM
Times-Bold: Standard "(003.000)" Standard ROM
Times-BoldItalic: Standard "(003.000)" Standard ROM
Times-Italic: Standard "(003.000)" Standard ROM
Times-Roman: Standard "(003.000)" Standard ROM
TimesNewRomanPS-BoldItalicMT: Standard "(001.003)" Standard ROM
TimesNewRomanPS-BoldMT: Standard "(001.004)" Standard ROM
TimesNewRomanPS-ItalicMT: Standard "(001.003)" Standard ROM
TimesNewRomanPSMT: Standard "(001.003)" Standard ROM
Univers-Bold: Standard "(001.004)" Standard ROM
Univers-BoldExt: Standard "(001.001)" Standard ROM
Univers-BoldExtObl: Standard "(001.001)" Standard ROM
Univers-BoldOblique: Standard "(001.004)" Standard ROM
Univers-Condensed: Standard "(001.003)" Standard ROM
Univers-CondensedBold: Standard "(001.002)" Standard ROM
Univers-CondensedBoldOblique: Standard "(001.002)" Standard ROM
Univers-CondensedOblique: Standard "(001.003)" Standard ROM
Univers-Extended: Standard "(001.001)" Standard ROM
Univers-ExtendedObl: Standard "(001.001)" Standard ROM
Univers-Light: Standard "(001.004)" Standard ROM
Univers-LightOblique: Standard "(001.004)" Standard ROM
Univers-Oblique: Standard "(001.004)" Standard ROM
Univers: Standard "(001.004)" Standard ROM
Wingdings-Regular: Special "(Version 2.00)" Special ROM
ZapfChancery-MediumItalic: Standard "(003.000)" Standard ROM
ZapfDingbats: Special "(002.000)" Special ROM
AMEN
generate();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment