Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kam-printing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wizards
kam-printing
Commits
f1bd91bb
Commit
f1bd91bb
authored
9 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
PPD: Custom page sizes work
parent
9798e614
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ppd/PPD.pm
+1
-1
1 addition, 1 deletion
ppd/PPD.pm
ppd/PPD/Paper.pm
+2
-1
2 additions, 1 deletion
ppd/PPD/Paper.pm
ppd/gen-nessie-xcpt
+7
-4
7 additions, 4 deletions
ppd/gen-nessie-xcpt
with
10 additions
and
6 deletions
ppd/PPD.pm
+
1
−
1
View file @
f1bd91bb
...
@@ -369,7 +369,7 @@ sub emit_option($) {
...
@@ -369,7 +369,7 @@ sub emit_option($) {
my
$i
=
0
;
my
$i
=
0
;
for
my
$p
(
@
{
$c
->
{
Params
}})
{
for
my
$p
(
@
{
$c
->
{
Params
}})
{
$i
++
;
$i
++
;
print
"
*Param
$key
",
$p
->
{
Key
};
print
"
*Param
Custom
$key
",
$p
->
{
Key
};
print
'
/
',
$p
->
{
Name
}
if
defined
(
$p
->
{
Name
})
&&
$p
->
{
Name
}
ne
$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
};
printf
"
: %d %s %d %d
\n
",
$i
,
$p
->
{
Unit
},
$p
->
{
Min
},
$p
->
{
Max
};
}
}
...
...
This diff is collapsed.
Click to expand it.
ppd/PPD/Paper.pm
+
2
−
1
View file @
f1bd91bb
...
@@ -50,6 +50,7 @@ my %media = (
...
@@ -50,6 +50,7 @@ my %media = (
# JCL => 1, # Paper should be handled via JCL (default: 0)
# 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)
# PSCustomPageSize => PS, # PS code for setting custom PageSize (default: use setpagedevice)
# })
# })
sub
add_papers
($)
{
sub
add_papers
($)
{
# Scan available paper formats
# Scan available paper formats
...
@@ -89,7 +90,7 @@ sub add_papers($) {
...
@@ -89,7 +90,7 @@ sub add_papers($) {
}
sort
keys
%real_media
],
}
sort
keys
%real_media
],
Default
=>
$o
->
{
DefPaper
},
Default
=>
$o
->
{
DefPaper
},
Custom
=>
{
Custom
=>
{
PS
=>
'
pop pop pop << /PageSize [5 -2 roll] >> setpagedevice
',
PS
=>
$o
->
{
PSCustomPageSize
}
//
'
pop pop pop << /PageSize [5 -2 roll] >> setpagedevice
',
Params
=>
[
Params
=>
[
{
Key
=>
'
Width
',
Unit
=>
'
points
',
Min
=>
$minw
,
Max
=>
$maxw
},
{
Key
=>
'
Width
',
Unit
=>
'
points
',
Min
=>
$minw
,
Max
=>
$maxw
},
{
Key
=>
'
Height
',
Unit
=>
'
points
',
Min
=>
$minh
,
Max
=>
$maxh
},
{
Key
=>
'
Height
',
Unit
=>
'
points
',
Min
=>
$minh
,
Max
=>
$maxh
},
...
...
This diff is collapsed.
Click to expand it.
ppd/gen-nessie-xcpt
+
7
−
4
View file @
f1bd91bb
#!/usr/bin/perl
#!/usr/bin/perl
# FIXME: Custom paper sizes
# FIXME: Precision of paper sizes (and mismatch with paperconf)
# FIXME: Precision of paper sizes (and mismatch with paperconf)
# FIXME: Paper orientation
# FIXME: Color adjustments
# FIXME: Color adjustments
# FIXME: cupsIPPFinishings
# FIXME: cupsSingleFile?
use
strict
;
use
strict
;
use
warnings
;
use
warnings
;
...
@@ -75,7 +75,7 @@ option({
...
@@ -75,7 +75,7 @@ option({
JCL
=>
1
,
JCL
=>
1
,
Values
=>
[
Values
=>
[
{
Key
=>
'
False
',
Name
=>
'
Print normally
',
PS
=>
jopt
('
PRIVATE
',
"")
},
{
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({
...
@@ -87,8 +87,9 @@ PPD::Paper::add_papers({
MarginH
=>
11.34
,
MarginV
=>
11.34
,
# FIXME: show as floats
MarginH
=>
11.34
,
MarginV
=>
11.34
,
# FIXME: show as floats
JCL
=>
1
,
JCL
=>
1
,
PSPageSize
=>
sub
{
my
(
$m
)
=
@_
;
return
jopt
('
MEDIAXSIZE
',
$m
->
{
W
},
'
MEDIAYSIZE
',
$m
->
{
H
});
},
PSPageSize
=>
sub
{
my
(
$m
)
=
@_
;
return
jopt
('
MEDIAXSIZE
',
$m
->
{
W
},
'
MEDIAYSIZE
',
$m
->
{
H
});
},
# FIXME: LeadingEdge
PSCustomPageSize
=>
jopt
('
MEDIAXSIZE
',
'
\1
',
'
MEDIAYSIZE
',
'
\2
'),
});
});
switch_group
('
Media
');
switch_group
('
Media
');
option
({
option
({
...
@@ -270,6 +271,8 @@ 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
({
option
({
Key
=>
'
XRFeed
',
Key
=>
'
XRFeed
',
Name
=>
'
Feed Orientation
',
Name
=>
'
Feed Orientation
',
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment