# Figure from PDF is always at new page

I have a figure in pdf file, which I want to include to my latex file. In the PDF file is only one figure, nothing else. This is code, how I iclude it:

\documentclass[a4paper,11pt]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{algpseudocode}
\usepackage{float}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{caption}
\usepackage{pdfpages}

\hypersetup{
pdfborder = {0 0 0},
urlcolor=blue
}

\author{Jozef Mrkvicka}
\title{Lorem Ipsum \\ (FF-FFF) }

\begin{document}
\maketitle
\begin{figure}[H]
\includegraphics[width=1.0\textwidth]{logo.pdf}
\end{figure}

\newpage
\section{Introduction}

\end{document}


The problem is that figure is always on new blank page, but I want it in the first page under title. Could someone help me, how to solve this problem?

• are you using the float package? – sergej May 24 '14 at 9:59
• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Holene May 24 '14 at 9:59
• Does your title page actually have enough room for the included PDF? – Holene May 24 '14 at 10:00
• OK, I edited first post and I add complete source. Yes I think there is enough place for it. – user3421673 May 24 '14 at 10:12
• Can you make logo.pdf available for download from somewhere? (Alternatively replace the \includegraphics with a \rule with the same dimensions.) – Ian Thompson May 24 '14 at 10:17

Edit: Removed the float environment

We use the trim and clip to cut out the logo from the PDF to a usable size. Then, we rescale a bit so it doesn't fill the whole page.

\documentclass[a4paper,11pt]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{algpseudocode}
\usepackage{float}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{caption}
\usepackage{pdfpages}

\hypersetup{
pdfborder = {0 0 0},
urlcolor=blue
}

\author{Jozef Mrkvicka}
\title{Lorem Ipsum \\ (FF-FFF) }

\begin{document}
\maketitle
\begin{center}
\includegraphics[trim=240 370 250 370 , width=0.3\textwidth]{logo.pdf}
\end{center}
\newpage
\section{Introduction}
\end{document}


gives us the following

• Why figure? A center environment will do better. There's nothing in LaTeX that requires \includegraphics to be in a figure environment. – egreg May 24 '14 at 12:35
• Because OP's MWE had a figure environment? – Trefex May 24 '14 at 13:10
• Well, why perpetuate the error? – egreg May 24 '14 at 13:10
• Then I want to be educated. Why is it an error to include a graphics in a figure environment? – Trefex May 24 '14 at 13:12
• It's not an error per se; but in this case it is not a float, since you want the picture exactly there. – egreg May 24 '14 at 13:12

You could try the titling-package for this.

\documentclass[11pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{titling}

\title{...}
\author{...}

\renewcommand{\maketitlehookd}{%
\includegraphics[width=1.0\textwidth]{logo.pdf}
}

\begin{document}
\maketitle
\end{document}

• In this code is some a little problem. It seems to work, but instead figure, there is black box. :/ – user3421673 May 24 '14 at 10:16
• @user3421673: remove [demo] then – user31729 May 24 '14 at 10:17
• Doesn't work. It jumped again on new page – user3421673 May 24 '14 at 10:18
• It jumps on a new page if the image is to big. Does \includegraphics[width=0.1\textwidth]{logo.pdf} work? – SLx64 May 24 '14 at 10:20
• Yes it works, but I don't think, that width=1.0 is too big. Theres is a lot of place. – user3421673 May 24 '14 at 10:26