Thanks to this answer, (to my own question) I've found a way to create a decorative border for my text using images. My problem now is that I want to make the decorative border farther from the text, that is, closer to the edge of the paper. (Any way will do.)
Here is my code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Compile with --shell-escape flag! %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt]{article}
\usepackage{lipsum} % just for the dummy text
\usepackage{tikzpagenodes}
\AddToHook{shipout/background}{
% ORIGINAL % \begin{tikzpicture}[remember picture, overlay,inner sep=0pt,outer sep=0pt]
\begin{tikzpicture}[remember picture, overlay,inner sep=40pt,outer sep=0pt]
\node[anchor=south,text width=\textwidth] at (current page text area.north) {
\foreach \x in {0,...,6}{\includegraphics[width=0.14285\textwidth,height=1.5cm]{resources/5rFkP.pdf}}% 1/7=0.14285
};
\node[anchor=north,text width=\textwidth] at (current page text area.south) {
\foreach \x in {0,...,6}{\includegraphics[width=0.14285\textwidth,height=1.5cm]{resources/5rFkP.pdf}}% 1/7=0.14285
};
\node[anchor=south,rotate=90,text width=\textheight] at (current page text area.west) {
\foreach \x in {0,...,11}{\includegraphics[width=0.0833\textheight,height=1.5cm]{resources/5rFkP.pdf}}% 1/12=0.0833
};
\node[anchor=south,rotate=-90,text width=\textheight] at (current page text area.east) {
\foreach \x in {0,...,11}{\includegraphics[width=0.0833\textheight,height=1.5cm]{resources/5rFkP.pdf}}% 1/12=0.0833
};
\node[anchor=north west] at (current page text area.south east) {\includegraphics[width=1.5cm,height=1.5cm]{resources/5rFkP.pdf}};
\node[anchor=north east] at (current page text area.south west) {\includegraphics[width=1.5cm,height=1.5cm]{resources/5rFkP.pdf}};
\node[anchor=south west] at (current page text area.north east) {\includegraphics[width=1.5cm,height=1.5cm]{resources/5rFkP.pdf}};
\node[anchor=south east] at (current page text area.north west) {\includegraphics[width=1.5cm,height=1.5cm]{resources/5rFkP.pdf}};
\end{tikzpicture}
}
\begin{document}
\lipsum
\end{document}
You can see that I've added some space between the pattern and the text. Obviously, this results in the some spacing also appearing between the sides and corners of the decorative border:
This is still a work in progress, but take into account that I will eventually make a unique image for the corners exclusively, so drawing the pattern from one corner to the other using the same image is not a solution to my problem.
Adding more pattern units to the sides does not result in filling the gaps created by the additional spacing I added, because the sides are not centre-aligned, but rather aligned with the text.
The Question:
How do I make a decorative border that is closer to the edge of the page while filling those gaps that are created by the extra spacing? (To see what the original looked like, uncomment the line labelled % ORIGINAL % and comment out the line that comes directly after it, or see this answer for an image.)
Resources for replication:
Flower pattern unit in PDF format: https://mega.nz/file/05ckAThb#HPAqp1XR2l_cTzzpKsYIA5V02L-VQ3p22Bq4Z8UqZOM

