# Alignment of logo in first and second page of a certificate

I was preparing a certificate. I was stumbled on this behavior:

The logo (on north west side) and the text between two logos (Department of....etc) are not maintaining the same alignment from page 1 to page 2. But page 2 onwards things are good. In other words, the logo and text slightly moves to left from page 1 to page 2 and then remains steady.

Here comes the code: First contents of namelist-1.csv

number,degree,Name,Dgn,subject,inst,place,
1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014
1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014
1,Dr,Abdul Ali,Asst. Prof., E \& I,Pondicherry Engineering College, Pondicherry - 605 014


The logos: pec_emblem and AICTE4;

The background: 10.jpg and seal;

Now the main code itself:

\documentclass[16pt]{scrartcl}
\usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage{pdflscape,setspace,amsmath,amssymb}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{calligra}
\usepackage{tgschola}
\usepackage{fourier-orns}
\usepackage{graphicx}
\usepackage{wallpaper}
\usepackage[normalem]{ulem}
\usepackage{charter}
\usepackage{microtype}
\usepackage{frcursive}
\hyphenpenalty 100000
%
\input Zallman.fd
\newcommand*\initfamily{\usefont{U}{Zallman}{xl}{n}}
%
\usepackage{datatool}
%
\def\signature#1#2{\parbox[b]{1in}{\smash{#1}\vskip12pt}
\hfill \parbox[t]{2.2in}{\shortstack{\vrule width 2.2in height 0.4pt\\\small#2}}}
\def\sigskip{\vskip0.4in plus 0.1in}
\def\beginskip{\vskip0.5875in plus 0.1in}
%
\definecolor{title}{RGB}{180,0,0}
\definecolor{other}{RGB}{171,0,255}
\definecolor{name}{RGB}{255,0,0}
\definecolor{phd}{RGB}{0,0,240}
%
\begin{document}
\begin{landscape}
%
\pagestyle{empty}
\TileWallPaper{1\paperwidth}{1\paperheight}{10.jpg}
\rotatebox{90}{\CenterWallPaper{0.5}{seal}}
%
\DTLforeach{names}{%
\dg=degree, \name=Name, \dgn=Dgn, \sub=subject, \inst=inst, \place=place}{%
%---------------------------------------------------
%---------------------My problem lies here------------------
%\noindent % These have no effect on my problem
%\hspace{-40pt} % This works out very badly
\begin{minipage}[l]{1in}%
\noindent % Has no effect on my problem
%---------------------My problem lies here------------------
\includegraphics[width=1\textwidth]{pec_emblem}
\end{minipage}%
\hspace*{\fill}
\begin{minipage}[c]{7.1in}%
{\centering
{\onehalfspacing
{\LARGE\bfseries {\color{other}{\fontfamily{pzc}\selectfont{Department of Computer Science \& Engineering}}}}\\[0.6em]
{\LARGE\bfseries {\color{phd}{{Pondicherry  Engineering College}}}}\\[0.3em]
{\calligra Puducherry} -- {\calligra 605 014\\}}
\par}%
\end{minipage}%
\hspace*{\fill} % A futile attempt to correct the problem
\begin{minipage}[r]{1.4in}
\includegraphics[width=1\linewidth]{{AICTE4}}
\end{minipage}%
\vskip1em
%
\begin{minipage}[l]{1.5in}
\end{minipage}%
\hfill
\begin{minipage}[c]{6.5in}
{\centering
{\onehalfspacing
{\Large\bfseries \color{title}{Certificate of Participation}}\par
\vskip0.5em
\par}}
\end{minipage}%
\hfill
\begin{minipage}[r]{1.5in}
%
\end{minipage}%
\vskip1.8em
%
{\doublespacing
This is to certify that \, \uuline{\emph{\large\sffamily\bfseries\color{name}{{{\color{magenta}\fontfamily{frc}\selectfont{\dg. \name}}}}}}, { \dgn}
of {\sub}, {\inst}, {\place},
has successfully participated in the two week AICTE sponsored Staff Development  Program
on  \emph{\color{phd}{Design Of Embedded Systems – Issues \& Challenges}}''  %sponsored   by  AICTE  and
organized  by  Department of  Computer Science \&
Engineering, Pondicherry  Engineering   College, from
16\textsuperscript{th} to 27\textsuperscript{th} April 2012.}

\noindent
%
{\singlespacing
\vfill
\hspace{-40pt}
\begin{minipage}[l]{2.5in}
\sigskip \signature{}{Dr. Ka. Selvaradjou \\ Co-ordinator\phantom{p} }
\end{minipage}
\hfill
\begin{minipage}[c]{4.7in}
\begin{minipage}[l]{2.25in}
\sigskip \signature{}{\phantom{j}Dr. E. Ilavarasan\phantom{j} \\ \phantom{p}Co-ordinator\phantom{p} }
\end{minipage}
\hfill
\begin{minipage}[r]{2.25in}
\sigskip \signature{}{\phantom{j}Dr. N. Sreenath\phantom{j} \\ \phantom{p}Professor \& Head, CSE\phantom{p} }
\end{minipage}
\end{minipage}
\hfill
\begin{minipage}[r]{2.5in}
\sigskip \signature{}{Prof. V. Prithiviraj \\ Principal }
\end{minipage}}
%
\vfil
\pagebreak
}
\end{landscape}
\end{document}


When I overlay the pages 1 and 2 (first one is not sitting exactly on one another) this is what I get:

Second one (pages 2 and 3 overlayed) is OK.

-
I have had funny behaviour like that in the past with scrartcl. which I solve by putting my titlepage in a \begin{titlepage}\end{titlepage}. I think by default scrartcl expect one. what happens if you add the option notitlepage to your class definition? –  ArTourter Apr 20 '12 at 2:01
was worth a try but it is indeed weird. btw adding \parindent 0pt does help with the centering of the non paragraph elements. still playing with your file though. –  ArTourter Apr 20 '12 at 2:31

I seem to have fixed it by moving the begining of the datactl loop before the change of \linesrpread and just after the \begin{landscape}.

<...>
\definecolor{title}{RGB}{180,0,0}
\definecolor{other}{RGB}{171,0,255}
\definecolor{name}{RGB}{255,0,0}
\definecolor{phd}{RGB}{0,0,240}
%
\parindent 0pt

\begin{document}
\begin{landscape}
%
\pagestyle{empty}
\DTLforeach{names}{%
\dg=degree, \name=Name, \dgn=Dgn, \sub=subject, \inst=inst, \place=place}{%

\TileWallPaper{1\paperwidth}{1\paperheight}{g1cU7}%Border-2 and 15
\rotatebox{90}{\CenterWallPaper{0.5}{Y73F3}}
%
%---------------------------------------------------
%---------------------My problem lies here------------------
%\noindent % These have no effect on my problem
%\hspace{-40pt} % This works out very badly
\begin{minipage}[l]{1in}%
<...>


I also put the pagestyle definition about the loop as it doesn't need to be repeated.

I am not sure why it works but I just tried it that way as somehow it made sense to me.

-