-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdfcss.vm
More file actions
96 lines (80 loc) · 2.3 KB
/
pdfcss.vm
File metadata and controls
96 lines (80 loc) · 2.3 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
## Macro title: PDF CSS
## Macro has a body: N
## Body processing: No macro body
## Output: HTML
##
## Developed by: Sam Hall
## Date created: 13/05/2014
## Installed by: PF
## @noparams
#set($debugStyles=false)
#set($servletPath=$req.getServletPath())
#if ($servletPath =="/spaces/flyingpdf/pdfpageexport.action")
#set($pageTitle=$content.getTitle())
#if ($debugStyles)
#set($debugBlue="background-color:cyan !important;")
#set($debugYellow="background-color:yellow !important;")
#set($debugRed="background-color:#FBB !important;")
#else
#set($debugBlue="")
#set($debugYellow="")
#set($debugRed="")
#end
<div class="pdf-header">
<img width="300" height="100" align="left" src="data:image/gif;base64,R0lGODdhAQABAJEAAP///8zMzAAAAAAAACwAAAAAAQABAAECAkwBADs="/>
<span>$pageTitle</span>
</div>
<table class="pdf-footer">
<tr>
<td class="confluenceTd" colspan="2">Alleen voor intern gebruik</td>
<td class="confluenceTd" style="width: 120px;text-align:right"><p><span class="page-cnt"></span></p></td></tr>
<tr>
<td class="confluenceTd" style="border:none" colspan="3">
<div style="text-align: center;"><strong><span style="color: rgb(255,0,0);">Vertrouwelijk.</span></strong></div>
</td>
</tr>
</table>
<style>
<!--
@page { $debugRed
size: A4;
margin: 42mm 10mm 32mm 10mm; /* headers/footers seem to ignore margins */
padding: 0 !important; /* maintains sanity */
/* Header Section */
@top-center { $debugYellow
content: element(runninglogo);
text-align:left;
padding-top: 10mm; /* otherwise doesn't respect top margin */
display: table-cell;
vertical-align: top;
overflow:visible;
}
/* Footer Section */
@bottom-center { $debugYellow
content: element(runningfooter);
padding-bottom: 10mm; /* otherwise doesn't respect bottom margin */
}
}
/* Remove default page title header */
div.pagetitle > h1 {
display: none;
}
div.pdf-header { $debugRed
position: running(runninglogo);
}
div.pdf-header > span { $debugBlue
line-height: 1.2;
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 20pt;
font-weight:bold;
}
table.pdf-footer {
margin-left: 10mm;
position: running(runningfooter);
}
.page-cnt:before {
content: "Page " counter(page) " of " counter(pages);
}
-->
</style>
#end