diff --git a/ppd/NOTES b/ppd/NOTES new file mode 100644 index 0000000000000000000000000000000000000000..ce45068e4142162c872ab07fd4dfa1ebb757ba5f --- /dev/null +++ b/ppd/NOTES @@ -0,0 +1,8 @@ +AnySetup priorities: + +2x Media types +3x Input slot +4x Duplex, Collate +5x Finishing +7x Resolution +1xx Miscellaneous diff --git a/ppd/PPD.pm b/ppd/PPD.pm index c1ec98f054ea4d3b876c5ca613bff888ee462a87..f0c850593ac1891c68eab08a481c98cc92ed19dd 100644 --- a/ppd/PPD.pm +++ b/ppd/PPD.pm @@ -258,6 +258,7 @@ declare('d', # VMOption not supported yet [ 'VariablePaperSize', 'b', 1 ], [ 'Protocols', 's', undef ], + [ 'AccurateScreensSupport', 'b', undef ], ); # Group "c": CUPS options diff --git a/ppd/PPD/Common.pm b/ppd/PPD/Common.pm index 8ed9d4943765207d7b77222c70d5b5edd417b8b0..5b431535b6b8e638bd12a5b9324dc90950889e3b 100644 --- a/ppd/PPD/Common.pm +++ b/ppd/PPD/Common.pm @@ -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 }, diff --git a/ppd/PPD/Paper.pm b/ppd/PPD/Paper.pm index 7464b6a954b8ca0c828a43a1198a3dad6310bc23..adf19d5b1aeed760db3dc12a834f34f1cf51fef6 100644 --- a/ppd/PPD/Paper.pm +++ b/ppd/PPD/Paper.pm @@ -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{$_}; diff --git a/ppd/gen-hp b/ppd/gen-hp index 2a4d16798b2920ed143df8b1894233489448ce07..be9883b75ba0c94193fac0a2baf6eac2d0f234f3 100755 --- a/ppd/gen-hp +++ b/ppd/gen-hp @@ -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 diff --git a/ppd/gen-phaser b/ppd/gen-phaser index 45218f0ac6a063bb0d8c53d3f7cc657508953178..8b33d6eaf8206bb4fafbf04b63e51d3de5aa0af4 100755 --- a/ppd/gen-phaser +++ b/ppd/gen-phaser @@ -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(); diff --git a/ppd/gen-priserka b/ppd/gen-priserka index ec0a8ebbb6b2f42e8b7b07a7661be32452eccf4b..2dfd60305cd00ddcf5240e0aa815e173ff5637d0 100755 --- a/ppd/gen-priserka +++ b/ppd/gen-priserka @@ -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',