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

PPD: Finishings

parent 55b3b8dd
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl
# FIXME: Custom paper sizes
# FIXME: Precision of paper sizes
# FIXME: Precision of paper sizes (and mismatch with paperconf)
# FIXME: Paper orientation
# FIXME: Color adjustments
use strict;
use warnings;
......@@ -225,48 +226,62 @@ option({
],
});
# 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
# ],
#});
option({
Key => 'StapleLocation',
Name => 'Stapling',
Choice => 'PickOne',
Priority => 55,
JCL => 1,
Values => [
{ Key => 'None', Name => 'No Staple', PS => jopt('FINISH_STAPLE', ""), Default => 1 },
{ Key => 'SinglePortrait', Name => '1 Staple (Portrait)', PS => jopt('FINISH_STAPLE', '20') },
{ Key => 'SingleLandscape', Name => '1 Staple (Landscape)', PS => jopt('FINISH_STAPLE', '21') },
{ Key => 'DualPortrait', Name => '2 Staples (Portrait)', PS => jopt('FINISH_STAPLE', '28') },
{ Key => 'QuadPortrait', Name => '4 Staples (Portrait)', PS => jopt('FINISH_STAPLE', '40') },
],
});
# 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' },
# ],
#});
option({
Key => 'XRPunch',
Name => 'Hole Punch',
Choice => 'PickOne',
Priority => 56,
JCL => 1,
Values => [
{ Key => 'None', Name => 'No Hole Punching', PS => jopt('FINISH_PUNCH', ""), Default => 1 },
{ Key => '2HolePunch', Name => '2 Hole Punch', PS => jopt('FINISH_PUNCH', '90 94') },
{ Key => '4HolePunch', Name => '4 Hole Punch', PS => jopt('FINISH_PUNCH', '92 93') },
],
});
option({
Key => 'XRFold',
Name => 'Folding',
Choice => 'PickOne',
Priority => 58,
JCL => 1,
Values => [
{ Key => 'None', Name => 'No Folding', PS => jopt('FINISH_FOLD', ""), Default => 1 },
{ Key => 'BiFold', Name => 'Booklet Fold', PS => jopt('FINISH_FOLD', '111') },
{ Key => 'BiFoldStaple', Name => 'Booklet Fold and Staple', PS => jopt('FINISH_FOLD', '110') },
{ Key => 'BiFoldSwap', Name => 'Booklet Fold and Swap Sides', PS => jopt('FINISH_FOLD', '113') },
{ Key => 'SingleFoldInside', Name => 'Single Fold and Print Inside', PS => jopt('FINISH_FOLD', '1003') },
{ Key => 'SingleFoldOutside', Name => 'Single Fold and Print Outside', PS => jopt('FINISH_FOLD', '1004') },
],
});
option({
Key => 'XRFeed',
Name => 'Feed Orientation',
Choice => 'PickOne',
Priority => 59,
JCL => 1,
Values => [
{ Key => 'AutoSelect', Name => 'Automatically Select', PS => jopt('FEED_ORIENTATION', "automatic"), Default => 1 },
{ Key => 'LongEdge', Name => 'Long Edge First', PS => jopt('FEED_ORIENTATION', 'long-edge-first') },
{ Key => 'ShortEdge', Name => 'Short Edge First', PS => jopt('FEED_ORIENTATION', 'short-edge-first') },
],
});
# FIXME: Update
#constrain(undef, 'InputSlot', 'MediaType', sub {
......@@ -280,19 +295,6 @@ option({
# 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({
......@@ -321,21 +323,6 @@ option({
],
});
# 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)
# ],
#});
# As reported by the printer (FIXME)
fonts( <<'AMEN' );
AlbertusMT-Italic: Standard "(001.001)" Standard ROM
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment