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
fd8bfef4
Commit
fd8bfef4
authored
9 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
PPD: Revived generator for Priserka (Xerox WC5230)
parent
64bddaa4
No related branches found
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
-2
1 addition, 2 deletions
ppd/PPD.pm
ppd/PPD/PJL.pm
+1
-1
1 addition, 1 deletion
ppd/PPD/PJL.pm
ppd/gen-priserka
+39
-38
39 additions, 38 deletions
ppd/gen-priserka
with
41 additions
and
41 deletions
ppd/PPD.pm
+
1
−
2
View file @
fd8bfef4
...
@@ -392,7 +392,6 @@ declare('d',
...
@@ -392,7 +392,6 @@ declare('d',
define_head_group
({
Key
=>
'
c
',
Name
=>
'
CUPS options
'
});
define_head_group
({
Key
=>
'
c
',
Name
=>
'
CUPS options
'
});
declare
('
c
',
declare
('
c
',
[
'
cupsFilter
',
'
s
',
undef
],
[
'
cupsFilter
',
'
s
',
undef
],
[
'
cupsProtocol
',
'
s
',
undef
],
);
);
# Group "j": JCL options
# Group "j": JCL options
...
@@ -569,7 +568,7 @@ sub generate() {
...
@@ -569,7 +568,7 @@ sub generate() {
check_missing
();
check_missing
();
print
"
*PPD-Adobe:
",
format_value
('
q
',
get
('
FormatVersion
')),
"
\n
";
print
"
*PPD-Adobe:
",
format_value
('
q
',
get
('
FormatVersion
')),
"
\n
";
print
"
*% PPD file generated by
UCW
PPD generator
\n
";
print
"
*% PPD file generated by
KAM
PPD generator
\n
";
for
my
$g
(
@head_groups
,
@ui_groups
,
@nonui_groups
)
{
for
my
$g
(
@head_groups
,
@ui_groups
,
@nonui_groups
)
{
emit_group
(
$groups
{
$g
});
emit_group
(
$groups
{
$g
});
...
...
This diff is collapsed.
Click to expand it.
ppd/PPD/PJL.pm
+
1
−
1
View file @
fd8bfef4
...
@@ -5,7 +5,7 @@ our @EXPORT = qw(jopt);
...
@@ -5,7 +5,7 @@ our @EXPORT = qw(jopt);
use
PPD
;
use
PPD
;
sub
add_jcl
($)
{
sub
add_jcl
(
;
$) {
my
$opt
=
$_
[
0
]
//
{};
my
$opt
=
$_
[
0
]
//
{};
set
('
JCLBegin
',
'
<1B>%-12345X@PJL<0A>
');
set
('
JCLBegin
',
'
<1B>%-12345X@PJL<0A>
');
set
('
JCLToPSInterpreter
',
'
@PJL ENTER LANGUAGE = POSTSCRIPT<0A>
');
set
('
JCLToPSInterpreter
',
'
@PJL ENTER LANGUAGE = POSTSCRIPT<0A>
');
...
...
This diff is collapsed.
Click to expand it.
ppd/gen-priserka
+
39
−
38
View file @
fd8bfef4
...
@@ -22,7 +22,7 @@ set('Protocols', 'PJL BCP TBCP');
...
@@ -22,7 +22,7 @@ set('Protocols', 'PJL BCP TBCP');
set
('
FileSystem
',
1
);
set
('
FileSystem
',
1
);
set
('
AccurateScreensSupport
',
1
);
set
('
AccurateScreensSupport
',
1
);
set
('
cups
Protocol
',
'
None
');
set
('
cups
Filter
',
'
application/vnd.cups-postscript 0 /aux/root/xerox-acct
');
define_ui_group
({
Key
=>
'
Basic
',
Name
=>
'
Basic options
'
});
define_ui_group
({
Key
=>
'
Basic
',
Name
=>
'
Basic options
'
});
...
@@ -34,9 +34,12 @@ PPD::PJL::add_jcl();
...
@@ -34,9 +34,12 @@ PPD::PJL::add_jcl();
PPD::Paper::
add_papers
({
PPD::Paper::
add_papers
({
MinW
=>
252
,
MaxW
=>
864
,
MinW
=>
252
,
MaxW
=>
864
,
MinH
=>
278
,
MaxH
=>
1368
,
MinH
=>
278
,
MaxH
=>
1368
,
MarginH
=>
11.62
,
MarginV
=>
11.62
,
# FIXME: show as floats
MarginH
=>
11.62
,
MarginV
=>
11.62
,
PSPageSize
=>
sub
{
my
(
$m
)
=
@_
;
return
sprintf
("
<< /PageSize [%d %d] >> setpagedevice
",
$m
->
{
W
},
$m
->
{
H
});
},
PSPageSize
=>
sub
{
# FIXME: LeadingEdge
my
(
$m
)
=
@_
;
return
sprintf
("
<< /PageSize [%d %d] >> setpagedevice
",
$m
->
{
W
},
$m
->
{
H
})
.
(
$m
->
{
W
}
>
620
?
"
userdict /XRXShortEdgeFinishing true put
"
:
"");
},
});
});
switch_group
('
Media
');
switch_group
('
Media
');
...
@@ -120,16 +123,17 @@ option({
...
@@ -120,16 +123,17 @@ 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
Edge
',
Key
=>
'
XRFeed
',
Name
=>
'
Tray 5 (Bypass) Feed Edge
',
Name
=>
'
Feed Orientation
',
Choice
=>
'
PickOne
',
Choice
=>
'
PickOne
',
Priority
=>
31
,
Priority
=>
31
,
Values
=>
[
Values
=>
[
{
Key
=>
'
LongEdge
',
Name
=>
'
Long Edge Feed
',
{
Key
=>
'
AutoSelect
',
Name
=>
'
Automatically Select
',
PS
=>
""
},
PS
=>
'
currentpagedevice /ManualFeed get { << /LeadingEdge 1 >> setpagedevice } if
'
},
{
Key
=>
'
LongEdge
',
Name
=>
'
Long Edge First
',
PS
=>
'
<< /LeadingEdge 1 >> setpagedevice
'
},
{
Key
=>
'
ShortEdge
',
Name
=>
'
Short Edge Feed
',
{
Key
=>
'
ShortEdge
',
Name
=>
'
Short Edge First
',
PS
=>
'
<< /LeadingEdge 0 >> setpagedevice
'
},
PS
=>
'
currentpagedevice /ManualFeed get { << /LeadingEdge 0 >> setpagedevice } if
'
},
],
],
});
});
...
@@ -184,7 +188,6 @@ option({
...
@@ -184,7 +188,6 @@ option({
PS
=>
'
userdict /XRXShortEdgeFinishing known
'
.
PS
=>
'
userdict /XRXShortEdgeFinishing known
'
.
'
{ << /Collate true /Staple 3 /LeadingEdge 0 /StapleDetails << /Type 7 /Location 5 >> >> setpagedevice }
'
.
'
{ << /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
'
},
'
{ << /Collate true /Staple 3 /LeadingEdge 1 /StapleDetails << /Type 7 /Location 6 >> >> setpagedevice } ifelse
'
},
# FIXME: Set XRXShortEdgeFinishing
],
],
});
});
...
@@ -208,31 +211,6 @@ option({
...
@@ -208,31 +211,6 @@ option({
# FIXME: XRFrontCoverSheet, XRBackCoverSheet, XRSlipSheetPrint, XRSlipSheetSource
# FIXME: XRFrontCoverSheet, XRBackCoverSheet, XRSlipSheetPrint, XRSlipSheetSource
# FIXME: Update
constrain
(
undef
,
'
InputSlot
',
'
MediaType
',
sub
{
my
(
$is
,
$mt
)
=
@_
;
return
!
((
$is
eq
'
Tray2
'
||
$is
eq
'
Tray3
')
&&
(
$mt
eq
'
Labels
'
||
$mt
eq
'
Envelope
'));
});
constrain
(
undef
,
'
Duplex
',
'
MediaType
',
sub
{
my
(
$dp
,
$mt
)
=
@_
;
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
'
});
define_ui_group
({
Key
=>
'
Quality
',
Name
=>
'
Print Quality
'
});
option
({
option
({
...
@@ -241,7 +219,7 @@ option({
...
@@ -241,7 +219,7 @@ option({
Choice
=>
'
Boolean
',
Choice
=>
'
Boolean
',
Priority
=>
70
,
Priority
=>
70
,
Values
=>
[
Values
=>
[
{
Key
=>
'
False
',
Name
=>
'
Off
',
PS
=>
'
<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 0 >> setpagedevice
'
,
Default
=>
1
},
{
Key
=>
'
False
',
Name
=>
'
Off
',
PS
=>
'
<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 0 >> setpagedevice
'
},
{
Key
=>
'
True
',
Name
=>
'
On
',
PS
=>
'
<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 1 >> setpagedevice
'
},
{
Key
=>
'
True
',
Name
=>
'
On
',
PS
=>
'
<< /PostRenderingEnhanceDetails << /Type 32 /TonerSaver 1 >> setpagedevice
'
},
],
],
});
});
...
@@ -268,7 +246,6 @@ option({
...
@@ -268,7 +246,6 @@ option({
Values
=>
[
Values
=>
[
{
Key
=>
'
600dpi
',
Name
=>
'
600 DPI (Fast)
',
{
Key
=>
'
600dpi
',
Name
=>
'
600 DPI (Fast)
',
PS
=>
'
<< /HWResolution [600 600] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice
',
PS
=>
'
<< /HWResolution [600 600] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice
',
Default
=>
1
,
},
},
{
Key
=>
'
1200dpi
',
Name
=>
'
1200 DPI (High Quality)
',
{
Key
=>
'
1200dpi
',
Name
=>
'
1200 DPI (High Quality)
',
PS
=>
'
<< /HWResolution [1200 1200] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice
'
PS
=>
'
<< /HWResolution [1200 1200] /DeviceRenderingInfo << /Type 26 /ValuesPerColorComponent 2 >> >> setpagedevice
'
...
@@ -431,4 +408,28 @@ ZapfChancery-MediumItalic: Standard "(003.000)" Standard ROM
...
@@ -431,4 +408,28 @@ ZapfChancery-MediumItalic: Standard "(003.000)" Standard ROM
ZapfDingbats:
Special
"
(002.000)
"
Special
ROM
ZapfDingbats:
Special
"
(002.000)
"
Special
ROM
AMEN
AMEN
# Various constraints
# FIXME
#constrain(undef, 'Duplex', 'PageSize', sub {
# my ($dp, $ps) = @_;
# return !($dp ne 'None' && $ps !~ /^(Env.*|)$/);
#});
constrain
(
undef
,
'
Duplex
',
'
MediaType
',
sub
{
my
(
$dp
,
$mt
)
=
@_
;
return
!
(
$dp
ne
'
None
'
&&
$mt
=~
/^(Labels|Transparency|Bond|CardStock|ExtraHeavyweight|Envelopes|Standard2)$/
);
});
# FIXME
#constrain(undef, 'StapleLocation', 'PageSize', sub {
# my ($dp, $ps) = @_;
# return !($dp ne 'None' && $ps !~ /^(Env.*|)$/);
#});
constrain
(
undef
,
'
StapleLocation
',
'
MediaType
',
sub
{
my
(
$st
,
$mt
)
=
@_
;
return
!
(
$st
ne
'
None
'
&&
$mt
=~
/^(Labels|Transparency|Envelopes)$/
);
});
generate
();
generate
();
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