GeneralLayering text on top of included pdf page

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Yfke
Posts: 4
Joined: Mon Aug 30, 2010 9:10 pm

Layering text on top of included pdf page

Post by Yfke »

Hiya everyone,

I'm having trouble including pages from an external pdf file into my tex-file. The thing is, I use LaTeX to automatically include names/addresses into letters (which are sent to lots people at a time, so I really don't want to be doing this manually ;) ). Yet this time, I'm sending a newsletter that is created in InDesign, and later exported as a pdf. I intentionally left some blank space in that pdf file, so that I could maybe, hopefully, if you guys no a solution, print those addresses right over the pdf page.

Basically, what I'm wanting to do is this: import a pdf page into LaTeX and be able to use it as a sort of "background" over which I can just print my own text (that is, those addresses). I know it accidentally happened to me a long time ago, but I can't seem to be able to reproduce that effect.

So far, I've used the pdfpages package and the includegraphics package. All I'm getting now is:
page 1: the page that is imported from the pdf
page 2: my own text
And I'd like to see them on the same page, layered!

Is there any way to do this? I'm working in the letter-class.

Thanks in advance,

Yfke

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

Layering text on top of included pdf page

Post by localghost »

There are several packages that allow to put stuff into the background of the text.


Best regards and welcome to the board
Thorsten
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Layering text on top of included pdf page

Post by frabjous »

Actually you can do this with pdfpages itself, using its picturecommand and picturecommands* options along with \put commands. (What's put in the former go in all pages; what goes in the latter just goes in the first page included.) E.g.,

Code: Select all

\includepdf[pages=1-2,%
    picturecommand*={%
    \put(200,300){My name}%
    \put(200,350){My address}%
}]{example.pdf}
mugge
Posts: 3
Joined: Mon Nov 30, 2015 10:25 pm

Re: Layering text on top of included pdf page

Post by mugge »

Hi about this topic..

now say that one would like to do this with several pages? like 15, and like to fill in some of the blanks for a lab.report. :)

how do I do this if the text should be on page 11? Do I simply putex y= 3700?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Layering text on top of included pdf page

Post by Stefan Kottwitz »

Hi Mugge,

welcome to the forum!

Feel free to open a new topic for any new question. No need to attach to older topics, we got enough space, and it stays well organized while your fresh question is in the focus.

For writing on chosen pages of a set of included PDF pages, I see two options:
  • call \includepdf several times, without the command or with it
  • use an \if \then conditional command in the pagecommand/picturecommand
Stefan
LaTeX.org admin
Post Reply