1

I have an png image, I would like to integrate it into a latex leaflet.

I would like to put this image at the corner of the page as a background. But I can't get it to go outside of the margins.

Here is my code:

\documentclass[10pt,foldmark,notumble]{leaflet}
\renewcommand*\foldmarkrule{.3mm}
\renewcommand*\foldmarklength{5mm}

\usepackage{polyglossia} \setmainlanguage{english} \setmainfont{Times New Roman}% <-- For English: Latin script here!

\usepackage{lipsum} \usepackage{comment} \usepackage{float}

\newcommand*\defaultmarker{\textsuperscript\textasteriskcentered}

\CutLine{1}% Dotted line without scissors \CutLine{6}% Dotted line without scissors

\begin{document}

%\begin{center}
\vspace*{-0.8in}
\hspace*{-0.8in}

\begin{figure}[H]
    {\includegraphics{drawing.pdf}} % 
\end{figure}

This is the title


\section{Abstract}

This is the abstract which is good.
\section{Background}

\lipsum[2-4]

\section{Objectives}

\lipsum[5-7]

\section{Techniques}

\lipsum[8-10]

\section{Results}

\lipsum[11]

% \includegraphics[width=0.9\columnwidth]{esempio}

\lipsum[12-13]

\section{Conclusions}

\lipsum[14]

\section{Acknowledgements}

\lipsum[1]

\section{Contact details}

Nome Cognome {\tt nome.cognome@studium.unict.it}

\end{document}

Would it be also possible to write on top of the image? (i.e. consider it as a background?)

enter image description here

enter image description here

ellat
  • 99
  • unrelated to your question, but I would suggest that if possible you should try to use a vector graphic like pdf instead of a png. A vector graphic won't get pixelated if your reader zooms in and given the simple graphic, the file size of your flyer will probably also be smaller. – samcarter_is_at_topanswers.xyz Jun 02 '23 at 12:24
  • 1
    You can use latex's hook mechanism to add elements to your background, see https://tex.stackexchange.com/a/642026/36296 for an example. – samcarter_is_at_topanswers.xyz Jun 02 '23 at 12:27

1 Answers1

2

You can use

\usepackage{background}

Then adjust the alignment of background image on the page using

\backgroundsetup{
  scale=1,
  opacity=0.5,
  angle=0,
  contents={\includegraphics[width=\paperwidth,height=\paperheight]{background_image.jpg}}
}

Then use it in the main document

\begin{document}
\BgThispage
...
\end{document}
cabohah
  • 11,455
  • 1
    You could improve your answer a lot, by adding a minimal working example, that can be tested immediately. Usually it would be a good idea to use the code from the question and add or change only relevant parts. You can use an image from package mwe as example image. And please mark your code using markdown. – cabohah Jun 02 '23 at 12:31
  • Thanks @chetan! This is exactly what I was missing. – ellat Jun 02 '23 at 13:33