Skip to content

Commit 63a509d

Browse files
committed
latexpdf: make first and last pages dynamically generated
JIRA: CI-526
1 parent 2e81c5b commit 63a509d

11 files changed

+123
-21
lines changed

_static/images/pdf-lastpage.png

-279 KB
Binary file not shown.

_static/images/pdf-titlepage.png

-808 KB
Binary file not shown.

_static/images/pdf/companylogo.png

51 KB
Loading
25.7 KB
Loading
2.53 MB
Loading
1.95 MB
Loading
File renamed without changes.

_static/latex/atendofbody.tex

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
%
2+
% Phoenix-RTOS
3+
%
4+
% Copyright 2025 Phoenix Systems
5+
% Author: Adam Debek
6+
%
7+
% This file is part of Phoenix-RTOS.
8+
%
9+
% %LICENSE%
10+
11+
\clearpage
12+
\thispagestyle{empty}
13+
14+
% Company logo in upper left corner
15+
\begin{flushleft}
16+
\includegraphics[width=0.45\textwidth]{companylogo.png}
17+
\end{flushleft}
18+
19+
\vspace{2.5cm}
20+
21+
% Right side main image
22+
\begin{flushright}
23+
\includegraphics[width=0.85\textwidth]{last-page-image.png}
24+
\end{flushright}
25+
26+
\vspace{1.6cm}
27+
28+
% Vertically stacked text
29+
\begin{flushright}
30+
{\fontsize{24}{28}\selectfont \textbf{Phoenix Systems sp. z o.o.}\\}
31+
\vspace{1cm}
32+
{\fontsize{9}{15}\selectfont TAX ID: PL113-285-28-93\\
33+
National Official Business Registry Number: 145963772\\
34+
KRS: 0000417999 (XIV Commercial Division of the National Court Register)\\
35+
Share capital 241 650,00 PLN (fully paid)\\}
36+
\vspace{0.8cm}
37+
\hypersetup{colorlinks=true, urlcolor=ps-orange}
38+
{\fontsize{10}{12}\selectfont
39+
\href{https://phoenix-rtos.com}{phoenix-rtos.com}
40+
~~~|~~~
41+
\href{https://github.com/phoenix-rtos}{github.com/phoenix-rtos}\\
42+
}
43+
\vspace{0.3cm}
44+
{\fontsize{10}{12}\selectfont Contact: [email protected]}
45+
\end{flushright}
46+
47+
\vspace{1.6cm}
48+
49+
% Three bottom blocks horizontally aligned
50+
\noindent
51+
\makebox[\textwidth][l]{%
52+
\fontsize{11}{15}\selectfont
53+
\begin{minipage}{0.275\textwidth}
54+
\textbf{POLAND (HQ)}\\
55+
Mangalia 2a\\
56+
02-758 Warsaw, Poland
57+
\end{minipage}
58+
\hfill
59+
\begin{minipage}{0.25\textwidth}
60+
\textbf{POLAND}\\
61+
Sienkiewicza 10/17\\
62+
18-400 Łomża, Poland
63+
\end{minipage}
64+
\hfill
65+
\begin{minipage}{0.4\textwidth}
66+
\textbf{UNITED KINGDOM}\\
67+
Engine Shed, Station Approach\\
68+
Temple Meads, Bristol, BS1 6QH, UK
69+
\end{minipage}
70+
}
71+
72+
\vspace{\fill}
73+
74+
% Orange line below bottom blocks
75+
\begin{center}
76+
\color{ps-orange}\rule{\textwidth}{2pt}
77+
\end{center}

_static/latex/maketitle.tex

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
%
2+
% Phoenix-RTOS
3+
%
4+
% Copyright 2025 Phoenix Systems
5+
% Author: Adam Debek
6+
%
7+
% This file is part of Phoenix-RTOS.
8+
%
9+
% %LICENSE%
10+
11+
\clearpage
12+
\thispagestyle{empty}
13+
14+
% Image on the upper part of the page
15+
\includegraphics[width=\textwidth]{first-page-image1.png}
16+
17+
\vspace{3.5cm}
18+
19+
\textcolor{ps-darkblue}{%
20+
{\fontsize{28}{36}\selectfont \textbf{Phoenix-RTOS Documentation}}
21+
}
22+
23+
\vspace{2.25cm}
24+
25+
% Right side main image
26+
\begin{flushright}
27+
\includegraphics[width=0.95\textwidth]{first-page-image2.png}
28+
\end{flushright}
29+
30+
\vspace{\fill}
31+
32+
% Orange line below bottom blocks
33+
\begin{center}
34+
\color{ps-orange}\rule{\textwidth}{2pt}
35+
\end{center}
36+
37+
\clearpage
38+
\pagestyle{plain}

_static/latex/preamble.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060

6161
\fancypagestyle{normal}[toc]{
62-
\fancyhead[R]{\includegraphics[width=2.5cm]{small_logo.png}}
62+
\fancyhead[R]{\includegraphics[width=2.5cm]{small-logo.png}}
6363
}
6464

6565
% Apply the style to all pages

conf.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@
7676
]
7777

7878
latex_additional_files = [
79-
"_static/images/pdf-titlepage.png",
80-
"_static/images/pdf-lastpage.png",
81-
"_static/images/small_logo.png"
79+
"_static/images/pdf/companylogo.png",
80+
"_static/images/pdf/last-page-image.png",
81+
"_static/images/pdf/small-logo.png",
82+
"_static/images/pdf/first-page-image1.png",
83+
"_static/images/pdf/first-page-image2.png"
8284
]
8385

8486
latex_elements = {
@@ -110,21 +112,6 @@
110112
\usepackage{tikz}
111113
''',
112114
'preamble': Path("_static/latex/preamble.tex").read_text(),
113-
'maketitle': r'''
114-
\newgeometry{margin=0pt}
115-
\thispagestyle{empty}
116-
\begin{figure}
117-
\includegraphics[width=\paperwidth,height=\paperheight]{pdf-titlepage.png}
118-
\end{figure}
119-
\clearpage
120-
\restoregeometry
121-
''',
122-
'atendofbody': r'''
123-
\newgeometry{margin=0pt}
124-
\thispagestyle{empty}
125-
\begin{figure}
126-
\includegraphics[width=\paperwidth,height=\paperheight]{pdf-lastpage.png}
127-
\end{figure}
128-
\restoregeometry
129-
''',
115+
'maketitle': Path("_static/latex/maketitle.tex").read_text(),
116+
'atendofbody': Path("_static/latex/atendofbody.tex").read_text()
130117
}

0 commit comments

Comments
 (0)