Generalpdfpages | Headers ignored

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
krabby
Posts: 12
Joined: Tue Mar 20, 2012 9:38 pm

pdfpages | Headers ignored

Post by krabby »

How can I include PDF files into my document. I am using PDFLaTeX.

I used google and there they told me to use pdfpages:

Code: Select all

\usepackage{pdfpages}
But the Problem is even just including the package results in strange formatting issues. The whole page is moving up on all pages (see image).

Any ideas ? It's like pdfpages is ignoring my header. I am using fancyhdr. Thanks
Attachments
latexpdfpages.png
latexpdfpages.png (19.63 KiB) Viewed 3834 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pdfpages | Headers ignored

Post by localghost »

For an adequate problem description please provide a proper minimal example that clearly reproduces the problem. Check the log file for any irregularities.


Best regards and welcome to the board
Thorsten
krabby
Posts: 12
Joined: Tue Mar 20, 2012 9:38 pm

pdfpages | Headers ignored

Post by krabby »

Hey,

my example code is attached. I need to put in 3 returns for the header so it is located properly. So it seems that the problem is not comming from pdfpages.

Code: Select all

\documentclass[a4paper,12pt]{report}
\usepackage[ngerman]{babel}
\usepackage{makebox}
\usepackage{geometry} 
\usepackage{ulem}  
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{cite}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{amsmath}
\usepackage[nottoc]{tocbibind}
\usepackage{tabularx}
\usepackage{setspace} %\onehalfspacing \doublespacing \singlespacing
\usepackage[bf]{caption}
\usepackage{lastpage}
\usepackage{color}
\usepackage{colortbl}
\definecolor{htw-farbe}{cmyk}{0,0.73,0.44,0.55}
\definecolor{hellgrau}{rgb}{0.95,0.95,0.95}
\definecolor{dunkelgrau}{rgb}{0.8,0.8,0.8}
\definecolor{dunkelgrau2}{rgb}{0.5,0.5,0.5}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[L]{\\ \\ \\ HEADER}                                                                                                                                
\fancyhead[R]{\thepage /\pageref{LastPage}}
\fancyfoot[L]{}
\fancyfoot[R]{\\ \\ \thepage /\pageref{LastPage}}
\renewcommand{\headrulewidth}{10pt}
\renewcommand{\headrule}{{\color{dunkelgrau2} \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
\renewcommand{\footrule}{{\color{dunkelgrau2} \hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
\renewcommand{\footrulewidth}{10pt}

\fancypagestyle{plain}{}
\pagestyle{fancy}

\usepackage[firstpage]{draftwatermark}
\SetWatermarkScale{4}
\SetWatermarkText{}

\geometry{a4paper,left=35mm,right=35mm, top=10mm, bottom=40mm} 
\title{Title}
\newcommand{\projektname}{Projekt}

\usepackage[final]{pdfpages}

\begin{document}

\renewcommand{\figurename}{Abb.}
\maketitle

\include{chapter1}       % Eidesstattliche Erklärung
\include{zitat}
\include{danksagung}	 % Danksagung
\include{abkuerzung}	 % Abkürzungsverzeichnis
\tableofcontents	 % Inhaltsverzeichnis
\include{chapter2}	 % Einleitung mit Motivation 				KAPITEL 1
\include{grundlagen}	 % Grundlagen und Messprinzipien			KAPITEL 2
\include{versuchsaufbau} % Der Versuchsaufbau					KAPITEL 3
\include{prototyp} 	 % Prototyp Entwicklung					KAPITEL 4
\include{praxistest}	 % Praxistest						KAPITEL 5
\include{ausblick}	 % Ausblick						KAPITEL 6

\bibliography{literatur}{}
\bibliographystyle{plain}
\listoffigures
\include{glossar}
\include{chapter3}

\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pdfpages | Headers ignored

Post by localghost »

Unfortunately, your example is useless for me.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

pdfpages | Headers ignored

Post by Stefan Kottwitz »

By the way, for single PDF images you could use \includegraphics of the graphicx package. This would respect your headings. pdfpages is rather for including whole pages (without your header or overwriting it) or multiple pages.

Stefan
LaTeX.org admin
krabby
Posts: 12
Joined: Tue Mar 20, 2012 9:38 pm

Re: pdfpages | Headers ignored

Post by krabby »

includegraphics still uses the header and footer. But all pdf files (I have 8 pages which have to be included) should be included WITHOUT the header and fill the whole page.
Boersma
Posts: 21
Joined: Mon Nov 22, 2010 9:29 pm

pdfpages | Headers ignored

Post by Boersma »

I actually did not read your code, (tl;dnr) but you can try to read the manual of pdfpages, page 2.

Code: Select all

\documentclass[a4paper]{article}
\usepackage{pdfpages}

\begin{document}
This is a page with its own pagenumbers and so on...
\includepdf[pages={8-12}]{mybeautifuldocument.pdf}
And here your document continues..., with your own pagenumbers...
\end{document}
Post Reply