[Tex/LaTex] How to write multi line text on the foreground of pages, and how can I align it

eso-picoverlayspdfpagespositioning

I'm using this to write on the foreground of individual pages of a large PDF (hopefully), i.e one with white spaces to enter in LaTeX notes.

\documentclass{article}
\usepackage{pdfpages}
\usepackage{eso-pic}
\begin{document}
\AddToShipoutPictureFG*{\AtPageCenter{
HERE IS SOME TEXT\
ohhello}
hi}
\includepdf[pages=11]{completenotes210pages.pdf}
\AddToShipoutPictureFG*{
\Huge HERE IS SOME TEXT.}
\includepdf[pages=12]{completenotes210pages.pdf}
\end{document}

and I'm trying to get ohhello on a separte line to HERE IS SOME TEXT on just the first page (or page11 from my 'master file'), usually all you would do is just put\ buuuuut it seems as though for some reason eso-pic doesn't like me doing that.

In addition I'm just trying to type from the very left top of the page, write and use \ for a new line and \qquad when i need some spaces etc. by default it writes from the bottom left and I don't think it even goes up a line when you get to the end.

How do I just get it to behave like normal writing on a blank sheet?

The positioning in eso-pic.pdf and atbegshi.pdf and all its other implementations are way too complicated for me.

Ideally I'd always want to write from the left, like you do, and I'd just make some tags to start a few inches down or so with preset

\
\
\
\
\

and I'd just define how many lines I want to skip.

I'm on this job 24 hours, if you know how and I can't do it properly straight away then lets team viewer and i swear you will be a saint. Almost 12 hours I've been at trying to implement this to large files, so hopefully I'll get it soon.

Do I need prefix \usepackage{atbegshi}?

Best Answer

You don't need to load atbegshi. eso-pic loads it automatically since it requires that package. Line breaks are done by two backslashes \\, not by a single one. \ (backslash and space) is for a space in the outut.

You could \parbox or a minipage environment to get line and paragraph breaks in the foreground text, such as

\AddToShipoutPictureFG*{\AtPageCenter{
  \parbox{.5\textwidth}{%
    HERE IS SOME TEXT\\
    more text on another line}}

Here I put paragraph box on the upper left corner, over the width of the whole page. I begin with a line skip, because top aligned parboxes align at the base line of the first line which would be too high here:

\AddToShipoutPictureFG*{\AtPageUpperLeft{
   \parbox[t]{\paperwidth}{%
     \mbox{}\\
     HERE IS SOME TEXT\\
     more text on another line}}
Related Question