-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathacta_de_apertura_benign.ps
63 lines (56 loc) · 1.48 KB
/
acta_de_apertura_benign.ps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%!PS-Adobe-3.0
%%Creator: Ignacio E. Losiggio
%%CreationDate: Wed Sep 27 20:39:00 2017
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%DocumentMedia: A4 595 842 0 () ()
%%BoundingBox: 0 0 595 842
%%EndComments
% collection key getbehind (collection key get) collection
/getbehind {
1 index 3 1 roll get exch
} bind def
/arraymap {
[ 3 1 roll forall ]
} bind def
%robado de https://en.wikibooks.org/wiki/PostScript_FAQ#How_to_concatenate_strings.3F
/concatstringarray % [(a) (b) ... (z)] --> (ab...z)
{ 0 1 index { length add } forall string
0 3 2 roll
{ 3 copy putinterval
length add
}
forall pop
} bind def
% Sacar la fecha actual
/ahoramesmo {
(%Calendar%) /IODevice resourcestatus
3 1 roll pop pop
{
(%Calendar%) currentdevparams
dup /DateTime known
{ /DateTime get }
{ [ exch
/Day getbehind (/) exch /Month getbehind (/) exch /Year getbehind
( ) exch
/Hour getbehind (:) exch /Minute getbehind (:) exch /Second get
] { 128 string cvs } arraymap concatstringarray } ifelse
}
{ (Not available) } ifelse
} def
% Imprimo algo
/fontsize 48 def
/ypos 780 def
/newline {
40 ypos moveto
/ypos ypos fontsize sub def
} def
/Courier findfont fontsize scalefont setfont
newline (Acta de apertura) show
/fontsize 24 def
/Courier findfont fontsize scalefont setfont
newline (Fecha de apertura: ) show ahoramesmo show
newline ( Maquina de voto: Impresora) show
newline ( Lugar: ekoparty2017) show
showpage