forked from publicmap/amche-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdf-layout.html
More file actions
342 lines (305 loc) · 10.1 KB
/
pdf-layout.html
File metadata and controls
342 lines (305 loc) · 10.1 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PDF Export Layout Template</title>
<style>
/* PDF Layout Template Styles */
/* This template is used for designing the PDF export footer layout */
/* Dimensions are in mm (millimeters) for PDF compatibility */
body {
margin: 0;
padding: 20px;
font-family: 'Open Sans', sans-serif;
background: #f5f5f5;
}
.pdf-page {
width: 210mm; /* A4 width */
height: 297mm; /* A4 height */
background: white;
margin: 0 auto;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
position: relative;
padding: 0;
}
.map-area {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
position: relative;
}
.footer-box {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 2mm;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.footer-content {
display: flex;
flex: 1;
gap: 4mm;
align-items: center;
}
.footer-left {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.footer-center {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 1.2mm;
min-width: 0; /* Allow text to wrap */
}
.footer-right {
flex: 0 0 auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 3mm;
}
.qr-code {
width: 20mm;
height: 20mm;
background: white;
border: 1px solid #ccc;
display: flex;
align-items: center;
justify-content: center;
font-size: 8px;
color: #333;
}
.date-text {
font-size: 6pt;
color: white;
text-align: left;
}
.text-content {
font-size: 7pt;
line-height: 2.2mm;
color: white;
word-wrap: break-word;
overflow-wrap: break-word;
}
.text-title {
font-size: 10pt;
font-weight: bold;
line-height: 3.5mm;
}
.text-description {
font-size: 8pt;
}
.text-data {
font-size: 7pt;
}
.text-url {
font-size: 7pt;
word-break: break-all;
opacity: 0.3;
}
.scale-bar {
display: flex;
flex-direction: column;
align-items: center;
gap: 1mm;
}
.scale-bar-visual {
width: 30mm;
height: 0.3mm;
background: white;
position: relative;
}
.scale-bar-visual::before,
.scale-bar-visual::after {
content: '';
position: absolute;
bottom: 0;
width: 0.3mm;
height: 2mm;
background: white;
}
.scale-bar-visual::before {
left: 0;
}
.scale-bar-visual::after {
right: 0;
}
.scale-bar-label {
font-size: 6pt;
color: white;
text-align: center;
width: 100%;
}
.north-arrow {
width: 12mm;
height: 12mm;
position: relative;
display: flex;
align-items: center;
justify-content: center;
perspective: 50mm;
}
.north-arrow-container {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transform-style: preserve-3d;
}
.north-arrow-cross {
position: relative;
width: 10mm;
height: 10mm;
transform-origin: center center;
border: 1.5px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
}
.south-arm {
position: absolute;
left: 50%;
bottom: 0;
width: 0.5mm;
height: 3mm;
background: rgba(255, 255, 255, 0.3);
transform: translateX(-50%);
}
.east-arm {
position: absolute;
top: 50%;
right: 0;
width: 3mm;
height: 0.5mm;
background: rgba(255, 255, 255, 0.3);
transform: translateY(-50%);
}
.west-arm {
position: absolute;
top: 50%;
left: 0;
width: 3mm;
height: 0.5mm;
background: rgba(255, 255, 255, 0.3);
transform: translateY(-50%);
}
.north-label {
position: absolute;
left: 50%;
top: -1.5mm;
transform: translateX(-50%);
font-size: 10pt;
font-weight: bold;
color: white;
text-align: center;
line-height: 1;
z-index: 10;
opacity: 1;
}
.info-panel {
margin-top: 20px;
padding: 20px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.info-panel h2 {
margin-top: 0;
color: #333;
}
.info-panel p {
color: #666;
line-height: 1.6;
}
.info-panel code {
background: #f5f5f5;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Monaco', 'Menlo', monospace;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="pdf-page">
<div class="map-area">
<!-- Map content area -->
</div>
<div class="footer-box">
<div class="footer-content">
<!-- Left: QR Code (Maximized) -->
<div class="footer-left">
<div class="qr-code">QR</div>
</div>
<!-- Center: Text Content -->
<div class="footer-center">
<div class="text-content text-title">Map Title</div>
<div class="text-content text-description">Exported at 15 Jan 2024, 3:45 PM</div>
<div class="text-content text-data">Data Sources: Attribution text here</div>
<div class="text-content text-url">https://example.com/map/link/url</div>
</div>
<!-- Right: Scale Bar and North Arrow -->
<div class="footer-right">
<div class="scale-bar">
<div class="scale-bar-label">1 km</div>
<div class="scale-bar-visual"></div>
</div>
<div class="north-arrow">
<div class="north-arrow-container">
<div class="north-arrow-cross">
<div class="north-label">N</div>
<div class="south-arm"></div>
<div class="east-arm"></div>
<div class="west-arm"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="info-panel">
<h2>PDF Layout Template</h2>
<p>This template shows the layout structure for the PDF export footer. The layout uses a three-column flex design with vertically centered content:</p>
<ul>
<li><strong>Left:</strong> Maximized QR code (20mm × 20mm)</li>
<li><strong>Center:</strong> Title, description with timestamp, data sources, and URL at 30% opacity (vertically centered, wraps as needed)</li>
<li><strong>Right:</strong> Scale bar and compass rose with 'N' indicator (centered with 3mm gap)</li>
</ul>
<p><strong>Key Measurements:</strong></p>
<ul>
<li>Footer box padding: <code>2mm</code></li>
<li>Gap between columns: <code>4mm</code></li>
<li>Gap between text elements: <code>1.2mm</code></li>
<li>Title line height: <code>3.5mm</code></li>
<li>Regular text line height: <code>2.2mm</code></li>
<li>QR code size: <code>20mm × 20mm</code> (maximized)</li>
<li>Scale bar area: <code>~30mm width</code></li>
<li>North arrow: <code>10mm</code> circle (compass rose) with bold 'N' label replacing north tick, S/E/W ticks at 30% opacity</li>
</ul>
<p><strong>Layout Enhancements:</strong></p>
<ul>
<li>All columns vertically centered with <code>align-items: center</code></li>
<li>QR code margin removed for maximum size within footer</li>
<li>Timestamp included in description field to avoid duplication</li>
<li>URL displayed at 30% opacity for subtle reference</li>
<li>Scale and north arrow centered and spaced with <code>gap: 3mm</code></li>
<li>Compass rose design: circular border with bold 'N' at north position, subtle ticks (30% opacity) for S/E/W directions</li>
<li>3D perspective transform: circle becomes elliptical when pitched, showing map plane tilt</li>
</ul>
</div>
</body>
</html>