first question in this stack community. I'm trying to create a new style for title page:
\documentclass{article}
\usepackage[italian]{babel}
\usepackage[paper=a4paper, top=4cm, bottom=2.5cm, left=2.0cm, right=2cm]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{afterpage}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{wrapfig}
\usepackage{lastpage}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{adjustbox}
\definecolor{green}{RGB}{0,89,0}
\hypersetup{
colorlinks=true,
urlcolor= green,
linkcolor = black,
}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{\url{mycompany.com}}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\begin{document}
\begin{titlepage}
\thispagestyle{fancy}
\begin{adjustbox}{width=\paperwidth}
\begin{tikzpicture}
\makebox[\textwidth][c]{\includegraphics[width = \textwidth]{Logo.jpg}}
\end{tikzpicture}
\end{adjustbox}
\begin{center}
\vspace*{3cm}
\rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{3.5pt}
\rule{\textwidth}{0.4pt}
\vspace{2\baselineskip}
{\Huge Sample Report\\}
\vspace{2\baselineskip}
\rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.5pt}
\rule{\textwidth}{1.6pt}
\vspace{2\baselineskip}
\vspace{2\baselineskip}
{\LARGE Italy \\}
\vspace{1\baselineskip}
{\large 23 May 2019 \\}
\end{center}
\end{titlepage}
\fancyhead[R]{Sample Report}
\fancyfoot[R]{Page \thepage~of \pageref{LastPage}} % start page counting
\lipsum[1-8]
\lipsum[1-8]
\end{document}
The pdf file renders fine but I get an error in my IDE (pasted below) corresponding to the \end{adjustbox} - not sure how I can fix this?
! Package graphics Error: Division by 0.See the graphics package documentation for explanation.Type H for immediate help.... \end{adjustbox}
Here's what I want the page to look like (blanked out areas - title, name, header etc. had confidential identifying information so had to be removed):


\makebox[\textwidth][c]{...}is useless given the\includegraphics[width = \textwidth]{...}and the contents of thetikzpictureenvironment is not valid TikZ syntax. If you replace the whole\begin{tikzpicture} ... \end{tikzpicture}with\includegraphics[width=\textwidth]{example-image}, the compilation works (but then, the\begin{adjustbox}{width=\paperwidth} ... \end{adjustbox}seems to be a convoluted way to do something that could probably be done with simply\includegraphics). Also, please useexample-imageinstead ofLogo.jpg: it's always available. – frougon Jul 15 '19 at 19:15\makebox[0pt]{\includegraphics[width=\paperwidth]{example-image}}\parat the beginning of thecenterenvironment. – frougon Jul 15 '19 at 19:22\begin{tikzpicture}with\paperwidthbut that didn't work either - I have a small amount of empty space left on the left margin now. – Gautam Jul 15 '19 at 19:23\makeboxin the\begin{center}loop places the image in the body of the document whereas I want it in the header only. – Gautam Jul 15 '19 at 19:25