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

PPD: Sections and priorities

parent a4bb3ebc
No related branches found
No related tags found
No related merge requests found
AnySetup priorities:
2x Media types
3x Input slot
4x Duplex, Collate
5x Finishing
7x Resolution
1xx Miscellaneous
......@@ -258,6 +258,7 @@ declare('d',
# VMOption not supported yet
[ 'VariablePaperSize', 'b', 1 ],
[ 'Protocols', 's', undef ],
[ 'AccurateScreensSupport', 'b', undef ],
);
# Group "c": CUPS options
......
......@@ -4,6 +4,7 @@ sub Duplex() { return {
Key => 'Duplex',
Name => '2-Sided Printing',
Choice => 'PickOne',
Priority => 40,
Values => [
{ Key => 'None', Name => 'Off (1-Sided)', PS => "<< /Duplex false >> setpagedevice" },
{ Key => 'DuplexNoTumble', Name => 'Long-Edge Binding', PS => "<< /Duplex true /Tumble false >> setpagedevice", Default => 1 },
......@@ -14,6 +15,7 @@ sub Duplex() { return {
sub Collate() { return {
Key => 'Collate',
Choice => 'Boolean',
Priority => 41,
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /Collate false >> setpagedevice' },
{ Key => 'True', Name => 'On', PS => '<< /Collate true >> setpagedevice', Default => 1 },
......
......@@ -74,7 +74,7 @@ sub add_papers($) {
Key => 'PageSize',
Name => 'Page Size',
Choice => 'PickAny',
Priority => 30,
Priority => 20,
Values => [ map {
my $k = $_;
my $m = $real_media{$_};
......@@ -101,7 +101,7 @@ sub add_papers($) {
Key => 'PageRegion',
Name => 'Page Region',
Choice => 'PickAny',
Priority => 40,
Priority => 21,
Values => [ map {
my $k = $_;
my $m = $real_media{$_};
......
......@@ -7,6 +7,7 @@ use lib ".";
use PPD;
use PPD::PJL;
use PPD::Paper;
use PPD::Common;
set('FileVersion', '1.0');
set('PCFileName', 'HP4350.PPD');
......@@ -18,65 +19,14 @@ set('PSVersion', '(3010.107) 0');
set('Throughput', 35);
set('TTRasterizer', 'Type42');
set('Protocols', 'PJL TBCP');
set('AccurateScreensSupport', 1);
set('cupsProtocol', 'None');
define_ui_group({ Key => 'Basic', Name => 'Basic options' });
option({
Key => 'Duplex',
Name => '2-Sided Printing',
Choice => 'PickOne',
Values => [
{ Key => 'None', Name => 'Off (1-Sided)', PS => "<< /Duplex false >> setpagedevice" },
{ Key => 'DuplexNoTumble', Name => 'Long-Edge Binding', PS => "<< /Duplex true /Tumble false >> setpagedevice", Default => 1 },
{ Key => 'DuplexTumble', Name => 'Short-Edge Binding', PS => "<< /Duplex true /Tumble true >> setpagedevice" },
]
});
option({
Key => 'Resolution',
Name => 'Printer Resolution',
Choice => 'PickOne',
Priority => 5,
Section => 'DocumentSetup',
Values => [
{ Key => '1200x1200dpi', Name => 'ProRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance false >> setpagedevice' },
{ Key => '600x600x2dpi', Name => 'FastRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance true >> setpagedevice', Default => 1 },
{ Key => '600x600dpi', Name => '600 DPI', PS => '<< /HWResolution [600 600] /PreRenderingEnhance false >> setpagedevice' },
]
});
option({
Key => 'HPEconoMode',
Name => 'EconoMode',
Choice => 'Boolean',
Values => [
{ Key => 'False', Name => 'Highest Quality', PS => '<< /EconoMode false >> setpagedevice', Default => 1 },
{ Key => 'True', Name => 'Save Toner', PS => '<< /EconoMode true >> setpagedevice' },
]
});
option({
Key => 'Smoothing',
Name => 'Resolution Enhancement',
Choice => 'Boolean',
Priority => 20,
Section => 'DocumentSetup',
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /PostRenderingEnhance true /PostRenderingEnhanceDetails << /REValue 0 /Type 8 >> >> setpagedevice' },
{ Key => 'True', Name => 'On', PS => '<< /PostRenderingEnhance true /PostRenderingEnhanceDetails << /REValue 2 /Type 8 >> >> setpagedevice', Default => 1 },
]
});
option({
Key => 'Collate',
Choice => 'Boolean',
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /Collate false >> setpagedevice' },
{ Key => 'True', Name => 'On', PS => '<< /Collate true >> setpagedevice', Default => 1 },
]
});
option(&PPD::Common::Duplex);
option(&PPD::Common::Collate);
PPD::PJL::add_jcl();
......@@ -89,6 +39,7 @@ PPD::Paper::add_papers({
switch_group('Media');
# Initialize media selection mechanism
# FIXME: Convert to JobPatch
option({
Key => 'HPInit',
Priority => 0,
......@@ -102,7 +53,7 @@ option({
Key => 'MediaType',
Name => 'Media Type',
Choice => 'PickOne',
Priority => 20,
Priority => 25,
Values => gen_values("<< /MediaType (%s) >> setpagedevice",
{ Key => 'None', PS => '<< /MediaType null >> setpagedevice', Default => 1 },
"Plain",
......@@ -124,7 +75,7 @@ option({
Key => 'InputSlot',
Name => 'Input Slot',
Choice => 'PickOne',
Priority => 20,
Priority => 30,
Values => [
{ Key => 'Auto', Name => 'Automatically Select', PS => "", Default => 1 },
{ Key => 'ManualFeed', Name => 'Tray 1 with manual feed', PS => '<< /ManualFeed true /MediaPosition 3 >> setpagedevice' },
......@@ -155,7 +106,7 @@ option({
Key => 'HPPaperPolicy',
Name => 'Fit to Page',
Choice => 'PickOne',
Priority => 10,
Priority => 29,
Values => [
{ Key => 'PromptUser', Name => 'PromptUser', PS => '', Default => 1 },
{ Key => 'NearestSizeAdjust', Name => 'Nearest Size and Scale', PS => '<< /Policies << /DeferredMediaSelection true /PageSize 3 >> >> setpagedevice' },
......@@ -163,7 +114,45 @@ option({
],
});
# As reported by the printer
define_ui_group({ Key => 'Quality', Name => 'Print Quality' });
option({
Key => 'Resolution',
Name => 'Printer Resolution',
Choice => 'PickOne',
Priority => 70,
Section => 'DocumentSetup',
Values => [
{ Key => '1200x1200dpi', Name => 'ProRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance false >> setpagedevice' },
{ Key => '600x600x2dpi', Name => 'FastRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance true >> setpagedevice', Default => 1 },
{ Key => '600x600dpi', Name => '600 DPI', PS => '<< /HWResolution [600 600] /PreRenderingEnhance false >> setpagedevice' },
]
});
option({
Key => 'HPEconoMode',
Name => 'EconoMode',
Choice => 'Boolean',
Priority => 71,
Values => [
{ Key => 'False', Name => 'Highest Quality', PS => '<< /EconoMode false >> setpagedevice', Default => 1 },
{ Key => 'True', Name => 'Save Toner', PS => '<< /EconoMode true >> setpagedevice' },
]
});
option({
Key => 'Smoothing',
Name => 'Resolution Enhancement',
Choice => 'Boolean',
Priority => 72,
Section => 'DocumentSetup',
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /PostRenderingEnhance true /PostRenderingEnhanceDetails << /REValue 0 /Type 8 >> >> setpagedevice' },
{ Key => 'True', Name => 'On', PS => '<< /PostRenderingEnhance true /PostRenderingEnhanceDetails << /REValue 2 /Type 8 >> >> setpagedevice', Default => 1 },
]
});
# Fonts as reported by the printer
# (versions set to "(1.0)", because the printer reports just "(.)")
fonts( <<'AMEN' );
Albertus-ExtraBold: Standard (1.0) Standard ROM
......
......@@ -7,6 +7,7 @@ use lib ".";
use PPD;
use PPD::PJL;
use PPD::Paper;
use PPD::Common;
set('FileVersion', '1.0');
set('PCFileName', 'XR7400.PPD');
......@@ -16,7 +17,6 @@ set('Product', 'Phaser 7400');
set('PSVersion', '(3016.101) 3');
# *DefaultOutputOrder: Normal
# *AccurateScreensSupport: True
# *DefaultGuaranteedMaxSeparations: 4
set('Throughput', 35);
......@@ -26,6 +26,7 @@ set('FileSystem', 1);
set('ColorDevice', 1);
set('DefaultColorSpace', 'CMYK');
set('AccurateScreensSupport', 1);
set('cupsProtocol', 'None');
......@@ -33,38 +34,8 @@ set('cupsProtocol', 'None');
define_ui_group({ Key => 'Basic', Name => 'Basic options' });
option({
Key => 'Duplex',
Name => '2-Sided Printing',
Choice => 'PickOne',
Values => [
{ Key => 'None', Name => 'Off (1-Sided)', PS => "<< /Duplex false >> setpagedevice" },
{ Key => 'DuplexNoTumble', Name => 'Long-Edge Binding', PS => "<< /Duplex true /Tumble false >> setpagedevice", Default => 1 },
{ Key => 'DuplexTumble', Name => 'Short-Edge Binding', PS => "<< /Duplex true /Tumble true >> setpagedevice" },
]
});
option({
Key => 'Resolution',
Name => 'Printer Resolution',
Choice => 'PickOne',
Priority => 5,
Section => 'DocumentSetup',
Values => [
{ Key => '1200x1200dpi', Name => 'ProRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance false >> setpagedevice' },
{ Key => '600x600x2dpi', Name => 'FastRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance true >> setpagedevice', Default => 1 },
{ Key => '600x600dpi', Name => '600 DPI', PS => '<< /HWResolution [600 600] /PreRenderingEnhance false >> setpagedevice' },
]
});
option({
Key => 'Collate',
Choice => 'Boolean',
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /Collate false >> setpagedevice' },
{ Key => 'True', Name => 'On', PS => '<< /Collate true >> setpagedevice', Default => 1 },
]
});
option(&PPD::Common::Duplex);
option(&PPD::Common::Collate);
# FIXME: Jog
......@@ -108,7 +79,7 @@ option({
Key => 'InputSlot',
Name => 'Input Slot',
Choice => 'PickOne',
Priority => 20,
Priority => 30,
Values => [
{ Key => 'Auto', Name => 'Automatically Select', PS => "", Default => 1 },
{ Key => 'ManualFeed', Name => 'Tray 1 with manual feed', PS => '<< /ManualFeed true /MediaPosition 0 /TraySwitch false >> setpagedevice' },
......@@ -118,11 +89,12 @@ option({
],
});
# FIXME: Move to output section, probably with Collate and Jog as well
option({
Key => 'OutputBin',
Name => 'Paper Destination',
Choice => 'PickOne',
Priority => 21,
Priority => 50,
Values => [
{ Key => 'TopBin', Name => 'Top Output Tray', PS => '<< /OutputType (Top Bin) >> setpagedevice' },
{ Key => 'LeftOutputTray', Name => 'Left Output Tray', PS => '<< /OutputType (Left Side Bin) >> setpagedevice' },
......@@ -163,11 +135,25 @@ constrain(undef, 'Duplex', 'MediaType', sub {
define_ui_group({ Key => 'Quality', Name => 'Print Quality / Color' });
# FIXME: This was HP, replace by OutputMode, but probably need DefaultResolution anyway
option({
Key => 'Resolution',
Name => 'Printer Resolution',
Choice => 'PickOne',
Priority => 70,
Section => 'DocumentSetup',
Values => [
{ Key => '1200x1200dpi', Name => 'ProRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance false >> setpagedevice' },
{ Key => '600x600x2dpi', Name => 'FastRes 1200', PS => '<< /HWResolution [1200 1200] /PreRenderingEnhance true >> setpagedevice', Default => 1 },
{ Key => '600x600dpi', Name => '600 DPI', PS => '<< /HWResolution [600 600] /PreRenderingEnhance false >> setpagedevice' },
]
});
option({
Key => 'OutputMode',
Name => 'Print Quality',
Choice => 'PickOne',
Priority => 46,
Priority => 71,
Values => [
{ Key => 'Automatic', PS => 'true /RRCustomProcs /ProcSet findresource /setautopq get exec', Default => 1 },
# FIXME: ValuesPerColorComponent etc.
......@@ -324,6 +310,4 @@ ZapfChancery-MediumItalic: Standard "(003.000)" Standard ROM
ZapfDingbats: Special "(002.000)" Special ROM
AMEN
# FIXME: Omitted configuration of halftoning
generate();
......@@ -20,9 +20,7 @@ set('Throughput', 26);
set('TTRasterizer', 'Type42');
set('Protocols', 'PJL BCP TBCP');
set('FileSystem', 1);
# FIXME: *AccurateScreensSupport: True
# FIXME: Priorities
set('AccurateScreensSupport', 1);
set('cupsProtocol', 'None');
......@@ -111,7 +109,7 @@ option({
Key => 'InputSlot',
Name => 'Input Slot',
Choice => 'PickOne',
Priority => 20,
Priority => 30,
Values => [
{ Key => 'Auto', Name => 'Automatically Select', PS => "", Default => 1 },
{ Key => 'Tray1', Name => 'Tray 1', PS => '<< /ManualFeed false /MediaPosition 0 >> setpagedevice' },
......@@ -126,7 +124,7 @@ option({
Key => 'XRFeedEdge',
Name => 'Tray 5 (Bypass) Feed Edge',
Choice => 'PickOne',
Priority => 21,
Priority => 31,
Values => [
{ Key => 'LongEdge', Name => 'Long Edge Feed',
PS => 'currentpagedevice /ManualFeed get { << /LeadingEdge 1 >> setpagedevice } if' },
......@@ -147,7 +145,7 @@ option({
Key => 'OutputBin',
Name => 'Paper Destination',
Choice => 'PickOne',
Priority => 25,
Priority => 50,
Values => [
{ Key => 'Auto', Name => 'Automatically Select', PS => '<< /OutputType (FINISHER TRAY)', Default => 1 },
{ Key => 'Middle', Name => 'Center Tray', PS => '<< /OutputType (CENTER TRAY2) >> setpagedevice' },
......@@ -160,7 +158,7 @@ option({
Key => 'Jog',
Name => 'Offset',
Choice => 'PickOne',
Priority => 26,
Priority => 51,
Values => [
{ Key => 'None', Name => 'No Offset', PS => '<< /Jog 0 >> setpagedevice', Default => 1 },
{ Key => 'EndOfSet', Name => 'Each Set', PS => '<< /OutputType (FINISHER TRAY) /Jog 3 >> setpagedevice' },
......@@ -171,7 +169,7 @@ option({
Key => 'StapleLocation',
Name => 'Stapling',
Choice => 'PickOne',
Priority => 30,
Priority => 55,
Values => [
{ Key => 'None', Name => 'No Staple', PS => '<< /Staple 0 >> setpagedevice', Default => 1 },
{ Key => 'SinglePortrait', Name => '1 Staple (Portrait)',
......@@ -194,7 +192,7 @@ option({
Key => 'XRFold',
Name => 'Folding',
Choice => 'PickOne',
Priority => 31,
Priority => 56,
Values => [
{ Key => 'None', Name => 'No Folding', PS => '<< /Fold 0 >> setpagedevice >>', Default => 1 },
{ Key => 'BiFold', Name => 'Booklet Fold',
......@@ -241,7 +239,7 @@ option({
Key => 'XREconomode',
Name => 'Draft Mode',
Choice => 'Boolean',
Priority => 50,
Priority => 70,
Values => [
{ Key => 'False', Name => 'Off', PS => '<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 0 >> setpagedevice', Default => 1 },
{ Key => 'True', Name => 'On', PS => '<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 1 >> setpagedevice' },
......@@ -252,7 +250,7 @@ option({
Key => 'XRImageQuality',
Name => 'Image Quality',
Choice => 'PickOne',
Priority => 51,
Priority => 71,
Values => [ map {
{ Key => ($_ > 0) ? "Lighten$_" : ($_ < 0) ? "Darken" . -$_ : "Normal",
Name => ($_ > 0) ? "Lighten (+$_)" : ($_ < 0) ? "Darken ($_)" : "Normal",
......@@ -266,7 +264,7 @@ option({
Key => 'Resolution',
Name => 'Printer Resolution',
Choice => 'PickOne',
Priority => 52,
Priority => 72,
Values => [
{ Key => '600dpi', Name => '600 DPI (Fast)',
PS => '<< /HWResolution [600 600] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment