3

I'm trying to include a PDF and then add text to it using overpic:

\documentclass[a4paper]{article}% ensure identical page size
\usepackage[abs]{overpic}
\usepackage{tikz}

\usepackage{geometry}
\geometry{a4paper, top=0mm, left=0mm, right=0mm, bottom=0mm}
\setlength\unitlength{1mm}

\begin{document}
\begin{overpic}[page=1,scale=1,unit=1mm]%
{test.pdf}
\put(25,220){text to put}

\end{overpic}
\end{document}

However there is always a little space on the left and the PDF is cutoff an the right. How do I do this with the PDF dead center and scaled 100%?

This is what the compiler gives as an error:

Overfull \hbox (14.99... pt to wide) in paragraph line 13--14
  • Simply put \hspace*{-17.21907pt}\begin{overpic}[.... – user11232 Apr 6 '15 at 23:41
  • 3
    Simply put \noindent\begin{overpic}[.... – Paul Gaborit Apr 7 '15 at 8:11
3

Your overpic is in a paragrapĥ with indentation. Use \noindent to remove this indentation:

\documentclass[a4paper]{article}% ensure identical page size
\usepackage[abs]{overpic}
\usepackage{tikz}

\usepackage{geometry}
\geometry{a4paper, top=0mm, left=0mm, right=0mm, bottom=0mm}
\setlength\unitlength{1mm}

\begin{document}
\noindent\begin{overpic}[page=1,scale=1,unit=1mm]%
{test.pdf}
\put(25,220){text to put}

\end{overpic}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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