5

Edited for an MWE (that hopefully works) I'm having trouble with the coding. I have this one picture, and I edited another picture to base it off that.

picture 1

picture 2

As you could probably tell, that shaded area of is very important in my project. I am trying to get a line of text to go there. Below is my code.

\documentclass[11pt,fleqn]{book}
\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,letterpaper]{geometry}
\usepackage{graphicx} 
\graphicspath{{Pictures/}} 
\usepackage{eso-pic}

\begin{document}

\begingroup
\thispagestyle{empty}
\AddToShipoutPicture*{\put(0,0){\includegraphics[scale=1.25]{pic1}}} 
\centering;
\vspace*{5cm}
\par\normalfont\fontsize{35}{35}\sffamily\selectfont
\textbf{Main Title Text Over Here on top}\\
{\LARGE Smaller Text Down Here}\par 
\vspace*{1cm}
{\Huge My Name}\par 
\endgroup

\newpage
\end{document}

Now, it works nice and fine for the first picture, but for the second picture with the same code:

picture 3

picture 4

I don't quite understand.. Both pictures have the same resolution, but why does it treat the other picture differently?

  • It would help to know the document class and what package \AddToShipoutPicture comes from. For example, if using standalone one would expect the two pages to have different sizes. If you are using a KOMA class, we are talking an entirely different set of problems. – John Kormylo Jan 2 '16 at 15:54
  • Oops. My bad @JohnKormylo \documentclass[11pt,fleqn]{book} \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,letterpaper]{geometry} \input{structure} Those are all in the header. (I didn't include the font packages and some other irrelevant things like that). Hopefully that clears things up. – Erfan Jan 2 '16 at 15:59
  • There are a number of questions here from people having problems with \AddTo ShipoutPicture, tex.stackexchange.com/questions/225020/… at least has a MWE. – John Kormylo Jan 2 '16 at 16:11
  • I tried adding the \usepackage{grffile} to the header, but that didn't work. I'll get right on it for the MWE, sorry about that – Erfan Jan 2 '16 at 16:16
  • Edited and added the MWE – Erfan Jan 2 '16 at 16:27
5

The problem here is that the image dimensions are already too large. One should look for a better scale.

\includegraphics[scale=.48]{pic1}

or

\includegraphics[scale=.55]{pic1}

One can also try with

\includegraphics[width=\paperwidth]{pic1}

this will scale the image such that it fit the width of paper or

\includegraphics[height=\paperheight]{pic1}

this will scale the image such that it fit the height of paper or

\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{pic1}

this will scale the image such that it fit the paper.

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.