diff --git a/ppd/PPD.pm b/ppd/PPD.pm index 569bdac2552211d3efe63c0080cd16d254d3065b..986b41c73e707f5664228dbd2447a94fdc131315 100644 --- a/ppd/PPD.pm +++ b/ppd/PPD.pm @@ -369,7 +369,7 @@ sub emit_option($) { my $i = 0; for my $p (@{$c->{Params}}) { $i++; - print "*Param$key ", $p->{Key}; + print "*ParamCustom$key ", $p->{Key}; print '/', $p->{Name} if defined($p->{Name}) && $p->{Name} ne $p->{Key}; printf ": %d %s %d %d\n", $i, $p->{Unit}, $p->{Min}, $p->{Max}; } diff --git a/ppd/PPD/Paper.pm b/ppd/PPD/Paper.pm index ee8e84fe74ac9bc0196eb3dd3f7e99863cce9b8b..46c969603fe509153fee4be1a50e5eb96958e90c 100644 --- a/ppd/PPD/Paper.pm +++ b/ppd/PPD/Paper.pm @@ -50,6 +50,7 @@ my %media = ( # JCL => 1, # Paper should be handled via JCL (default: 0) # PSPageSize => PS, # PS code for setting PageSize (subroutine called with ref to media object) # PSPageRegion => PS, # The same for PageRegion (default: use PSPageSize) +# PSCustomPageSize => PS, # PS code for setting custom PageSize (default: use setpagedevice) # }) sub add_papers($) { # Scan available paper formats @@ -89,7 +90,7 @@ sub add_papers($) { } sort keys %real_media ], Default => $o->{DefPaper}, Custom => { - PS => 'pop pop pop << /PageSize [5 -2 roll] >> setpagedevice', + PS => $o->{PSCustomPageSize} // 'pop pop pop << /PageSize [5 -2 roll] >> setpagedevice', Params => [ { Key => 'Width', Unit => 'points', Min => $minw, Max => $maxw }, { Key => 'Height', Unit => 'points', Min => $minh, Max => $maxh }, diff --git a/ppd/gen-nessie-xcpt b/ppd/gen-nessie-xcpt index b325930efdb7c20209df3fde5bb708b388a9e325..afeb2cf160f8d11650bc1b4915982c3410760158 100755 --- a/ppd/gen-nessie-xcpt +++ b/ppd/gen-nessie-xcpt @@ -1,9 +1,9 @@ #!/usr/bin/perl -# FIXME: Custom paper sizes # FIXME: Precision of paper sizes (and mismatch with paperconf) -# FIXME: Paper orientation # FIXME: Color adjustments +# FIXME: cupsIPPFinishings +# FIXME: cupsSingleFile? use strict; use warnings; @@ -75,7 +75,7 @@ option({ 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') }, + { Key => 'True', Name => 'Private print-out', PS => jopt('PRIVATE', 'YES') }, ], }); @@ -87,8 +87,9 @@ PPD::Paper::add_papers({ 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 + PSCustomPageSize => jopt('MEDIAXSIZE', '\1', 'MEDIAYSIZE', '\2'), }); + switch_group('Media'); option({ @@ -270,6 +271,8 @@ option({ ], }); +# This is very similar to *LeadingEdge, but the semantics are subtly different, +# so we prefer to use a different name. option({ Key => 'XRFeed', Name => 'Feed Orientation',