-
Notifications
You must be signed in to change notification settings - Fork 1
/
bankform.tex
152 lines (110 loc) · 4.93 KB
/
bankform.tex
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{xparse}
\usepackage{xcolor}
\usepackage[ocr-b]{ocr}
\usetikzlibrary{positioning,fit,calc}
\thispagestyle{empty} % no pagenumber. The form should be a stand alone macro... later.
%\definecolor{SEPAOrange}{RGB}{254,213,161}
\definecolor{SEPAOrange}{cmyk}{0, 0.13, 0.27, 0} % HKS 6 E @ Tonwert 45 %, Tonwert 100 % = 0, 0.45, 1, 0
\definecolor{SEPADOrange}{cmyk}{0, 0.45, 1, 0} % HKS 6 E @ Tonwert 100 %
\definecolor{SEPABlindcolor}{cmyk}{0, 0.71, 0.78 ,0} %HKS 12E Tonwert 20 % (100 % = 0, 0.85, 0.95, 0)
%FIXME: Values with Tonwert<100 % are estimated!
% switch on expl3 syntax
% (_ and : become part of macro names; spaces are ignored; ~ is normal space)
\ExplSyntaxOn
% make @ available as part of macro name
\makeatletter
%\formlines{\xs}{\yh}{5}{22}{IBAN}
\NewDocumentCommand { \formlines }{mmmmm}
%\formlines{x,y, width, label}
{
\filldraw[color=white] (#1, #2) rectangle (#4 * #3 + #1, #2 +1.5 * 4.2333 - 1.5); %Recepient 27 Char
% draw label
\node[every~form~label, anchor=south~west,align=left] at (#1,#2) {#5};
\foreach \x in {2,...,#4}
{
\draw[color=SEPAOrange, line~width=0.3mm] (#1 + \x * #3 -#3, #2 ) -- (#1 + \x * #3 -#3, #2 + 1.5 * 4.2333 - 1.5);
\draw[color=SEPAOrange, line~width=0.8mm] (#1 + \x * #3 -#3, #2 + 3 ) -- (#1 + \x * #3 -#3, #2 + 1.5 * 4.2333 - 1.5);
}
}
% switch off expl3 syntax and @
\ExplSyntaxOff\makeatother
\tikzset{
every form field/.style = {
fill=white,
inner sep=0pt,
minimum height=4mm,
align=center,
},
every form field middle/.style = {
every form field,
form field middle,
},
every form field start/.style = {
every form field,
form field start,
anchor=south west,
},
every form field end/.style = {
every form field,
form field end,
},
every form label/.style = {
fill=white, text=SEPABlindcolor,
inner sep=1pt,
outer sep=0pt,
font=\tiny\sffamily\bfseries,
},
every form digit/.style = {
anchor=base,
font=\ttfamily,
inner sep=0pt,
},
every form divider/.style = {
fill=black,
inner sep=0pt,
outer sep=0pt,
anchor=south,
minimum width=\formdividerwidth,
minimum height=\formdividerheight,
},
}
\begin{document}
\begin{tikzpicture}[x=1 mm, y=-1 mm, node distance=4 pt]
\pgfmathsetmacro{\yh}{4.2333} % y heigth step defined as 1/6 inch => 1/6 * 25.4 mm = 4.2333 mm
\pgfmathsetmacro{\xs}{7.62} % x start (own definition)
\pgfmathsetmacro{\xe}{141.5} % x end (own definition)
\pgfmathsetmacro{\widefield}{4.9859} % def: 134.62 mm / 27
\pgfmathsetmacro{\narrowfield}{3.9594} % def: 134.62 mm/ 34
\draw[color=SEPADOrange] (0, 4.5 *\yh) --(149.86, 4.5*\yh); upper dark orange line
\draw[color=SEPADOrange] (0, 20.5 *\yh) --(149.86, 20.5*\yh); lower dark orange line
\filldraw[draw=black,color=SEPAOrange] (7.62, 4.5*\yh) rectangle (149.86-7.62,105.83-1); %orange background
\node[anchor=north west,align=left,font=\sffamily] at (5, 0.5*\yh) {{\bfseries SEPA-Überweisung}/Zahlschein};
\node[anchor=north west,align=left,font=\sffamily] at (5, 1.6*\yh) {\ocr{Dagobert Bank}\\ \ocr{Entenhausen}};
\node[anchor=north west,align=left,font=\sffamily\scriptsize, color=SEPABlindcolor] at (65+5+44+2, 3) { %
Für Überweisungen in\\
Deutschland und\\
in andere EU-/EWR-\\
Staaten in Euro.};
\formlines{\xs}{5 * \yh}{\widefield}{27}{Zahlungsempfänger} %Recepient 27 Char
\formlines{\xs}{7 * \yh}{\narrowfield}{34}{IBAN} %IBAN 34 Char
\formlines{\xs}{9 * \yh}{\widefield}{9}{BIC} %BIC
\formlines{\xe - 12*5}{11 * \yh}{\widefield}{12}{Betrag: Euro, Cent} %Value 12 Char
\formlines{\xs}{13 * \yh}{\widefield}{27}{Kunden-Referenznummer - Verwendungszweck, ggf. Name und Anschrift des Zahlers}
\formlines{\xs}{15 * \yh}{\widefield}{27}{noch Verwendungszweck}
\formlines{\xs}{17 * \yh}{\widefield}{27}{Angaben zum Kontoinhaber/Zahler: Name, Vorname/Firma, Ort}
\formlines{\xs}{19 * \yh}{\widefield}{22}{IBAN} % IBAN 22 Char
\filldraw[draw=black,color=white] (149.86-17.59, 19* \yh) rectangle (\xe, 20.5*\yh -1.5); % Belegschluessel
\node[anchor=north west,font=\sffamily] at (149.86-17.59 + 1, 19* \yh) {\ocr{08}};
\filldraw[draw=black,color=white] (\xs, 21* \yh) rectangle (42.52, 24.5*\yh); % date
\node[every form label, anchor=north west,align=left] at (\xs, 21* \yh) {Datum};
\filldraw[draw=black,color=white] (42.52+5, 21*\yh) rectangle (149.86-17.59, 24.5*\yh); % signature
\node[every form label, anchor=north west,align=left] at (42.52+5, 21*\yh) {Unterschrift(en)};
\draw[draw=black,color=black, line width=0.3mm] (0,0) rectangle (149.86,105.83); % black border
%\draw[align=left] at (\yh,\yh) {SEPA-Überweisung};
\draw[color=SEPAOrange] (\xs, 4.5*\yh) --(\xs, 105.83-1); left orange line
\draw[color=SEPAOrange] (149.86-7.62, 4.5*\yh) --(149.86-7.62, 105.83-1); right orange line
\end{tikzpicture}
\end{document}