Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm having a strange issue with LaTeX: My document uses a PDF background that is included with \includepdf{pdf/title}. This PDF consist of some logos and a solid red colored stripe across the page. I need to show some text above this colored area. The problem is, that as soon the text is over this area it becomes invisible on the rendered PDF. I can select it with the cursor though. If I'm moving the text out of the colored area (but its still over the background PDF) the text becomes visible again.

\newcommand{\createCover}[3]
{

    \thispagestyle{empty}
    \begin{titlepage}
    \setlength{\TPHorizModule}{1mm}
    \setlength{\TPVertModule}{1mm}
    \textblockorigin{0mm}{0mm} 
    \begin{textblock}{111}(83,115)
        \begin{minipage}[c][1,78cm][c]{11,09cm}     
        \fontsize{22pt}{20pt}
        \selectfont
        \begin{center}
        #1
        \end{center}
        \end{minipage}
    \end{textblock}
    \begin{textblock}{111}(83,131)
        \begin{minipage}[c][4,81cm][t]{11,09cm} 
        \linespread{1.2}    
    \fontsize{16pt}{14pt}    
    \selectfont
    \begin{center}
    #2 \\ \medskip
    #3
    \end{center}
    \end{minipage}
    \end{textblock}
    \begin{textblock}{186}(22,264)
    \begin{minipage}[t][5,72cm][l]{17,57cm}
        \fontsize{12pt}{12pt}
        \selectfont
            {\em Subtext \hfill Subtext 2}\\
            {\em Subtext 3 \hfill Subtext 4}
    \end{minipage}
    \end{textblock}
    \newpage
    \end{titlepage}
    \includepdf{pdf/title}
}

I would be very thankful for any help.

UPDATE:

Since I'm not allowed to answer my own question for 8 hours, I'm updating my question with the solution that worked for me:

Thanks to Martin, I have found the solution. He was completely right: The PDF doc was in the foreground, so the underlining text was not visible.

The solution is to add the overlay parameter to the textpos package.

\usepackage[absolute,overlay]{textpos}

Now the text is in the foreground.

Thanks again.

share|improve this question
1  
Welcome to TeX.sx! Could you show as how you place the text exactly, i.e. using a short minimal working example (MWE). I assume the included PDF is simply placed in the foreground and not in the background. –  Martin Scharrer Jul 19 '11 at 19:56
    
Hello Martin, thanks for your help. I have attached my LaTeX code to the question. I think the PDF is in the background. –  Marlon Jul 19 '11 at 20:09
    
Thanks. Please always also add the minimum preamble and the document environment so other users can compile it directly. Use the {} or CTRL+K to indent the source code by four spaces, then it is formatted correctly. I did this for you now. –  Martin Scharrer Jul 19 '11 at 20:13
    
Thank you! The overlay option is exactly what I needed. Works like a charme. –  user13744 Apr 26 '12 at 19:47
add comment

1 Answer

up vote 2 down vote accepted

The issue here is that you use \includepdf which is intended to include PDF pages on their own without any text. Use \includegraphics[<options>]{<filename>} instead (needs the standard graphicx package). You can use textpos or tikz to place the image at the center of the page. You should do that first and then add the text so that it is placed on top.

Something like this should do it (adjust the size and positions for your needs!):

\documentclass[a4paper]{article}

\usepackage{setspace}
\usepackage[absolute]{textpos}
\usepackage{graphicx}

\usepackage{pdfpages}

\newcommand{\createCover}[3] {%
    \clearpage
    \thispagestyle{empty}%
    \begin{titlepage}%
    \setlength{\TPHorizModule}{1mm}%
    \setlength{\TPVertModule}{1mm}%
    \textblockorigin{0mm}{0mm}%
    \begin{textblock*}{297mm}(0pt,0pt)
        \includegraphics[width=!,height=!]{pdf/title}
    \end{textblock*}%
    \begin{textblock}{111}(83,115)
        \begin{minipage}[c][1,78cm][c]{11,09cm}
        \fontsize{22pt}{20pt}%
        \selectfont
        \begin{center}
        #1
        \end{center}%
        \end{minipage}%
    \end{textblock}%
    \begin{textblock}{111}(83,131)
        \begin{minipage}[c][4,81cm][t]{11,09cm} 
        \linespread{1.2}%
    \fontsize{16pt}{14pt}    
    \selectfont
    \begin{center}
    #2 \\ \medskip
    #3
    \end{center}
    \end{minipage}
    \end{textblock}
    \begin{textblock}{186}(22,264)
    \begin{minipage}[t][5,72cm][l]{17,57cm}
        \fontsize{12pt}{12pt}
        \selectfont
            {\em Subtext \hfill Subtext 2}\\
            {\em Subtext 3 \hfill Subtext 4}
    \end{minipage}
    \end{textblock}
    \end{titlepage}
}


\begin{document}

\createCover{Foo}{bar}{baz}

\end{document}

share|improve this answer
    
Hi Martin, thanks a lot for your help! I've got it working. I have updated my question with the solution. I'm sure that your solution will solve the problem too. Therefor I have accepted your answer as the right one :) Thanks again for your support! –  Marlon Jul 19 '11 at 20:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.