java-imp-print.mkiv /size: 1312 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=java-imp-print, % was: java-fil
3
%D version=1998.06.01,
4
%D title=\CONTEXT\ JavaScript Macros,
5
%D subtitle=Filing and Printing,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\startJSpreamble
auxiliary
used
now
15 16
function
DocumentFileName
()
{
17
var
Paths
=
this
.
path
.
split
("
/
")
;
18
Paths
=
Paths
[
Paths
.
length
-
1
]
.
split
("
.
")
;
19
return
(
Paths
[
0
])
20
}
21 22
function
Print
_
Page
_
Range
(
From
,
To
)
{
23
if
((
Number
(
From
)>
0
)
&&
(
Number
(
To
)
>=
Number
(
From
)))
{
24
var
myFrom
=
Number
(
From
)
-
1
;
25
var
myTo
=
Number
(
To
)
-
1
;
26
this
.
print
(
false
,
myFrom
,
myTo
,
true
)
;
27
}
28
}
29 30
function
Print
_
This
_
Page
()
{
31
this
.
print
(
false
,
this
.
pageNum
,
this
.
pageNum
,
true
)
;
32
}
33 34
\stopJSpreamble
35 36
\definereference
37
[
PrintSubPaginas
]
38
[
JS
(
Print
_
Page
_
Range
{
\firstsubpage
,
\lastsubpage
}
)]
39 40
\definereference
41
[
PrintSubPages
]
42
[
JS
(
Print
_
Page
_
Range
{
\firstsubpage
,
\lastsubpage
}
)]
43 44
\definereference
45
[
PrintDezePagina
]
46
[
JS
(
Print
_
This
_
Page
)]
47 48
\definereference
49
[
PrintThisPage
]
50
[
JS
(
Print
_
This
_
Page
)]
51 52
\endinput
53