I was working with pdfLaTeX, and I set the size of the A4 paper; but for some reasons I have to change to XeLaTeX. And I realize that it isn't the same size of the paper, because the header and foot aren't in the correct place. Can you explain or help me to fix it?
My code is:
\documentclass[10pt, a4paper]{article}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{lipsum}
\usepackage[ampersand]{easylist}
\usepackage{tikz}
\setlength{\hoffset}{.46cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\marginparwidth}{0cm}
\setlength{\topmargin}{0cm}
\setlength{\marginparsep}{0cm}
\setlength{\headheight}{.46cm}
\setlength{\headsep}{0cm}
\setlength{\textheight}{24.2cm}
\setlength{\footskip}{.96cm}
\setlength{\textwidth}{15cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}%
\chead{}%Vac
\rhead{
\parbox[c]{12.6cm}{\footnotesize{TEXT\newline Text}}\parbox[t]{2cm}{\footnotesize{Text}}
}
\lfoot{}%
\cfoot{}
\rfoot{
\parbox[c]{7.35cm}{\footnotesize{Text \newline Text}}\parbox[c]{5.4cm} {\footnotesize{\thepage}}\parbox[t]{4cm}{\footnotesize{Text}}
}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\begin{titlepage}
\begin{center}
\begin{huge} \textbf{TEXT}\end{huge}\\
\vspace*{.4cm}
\begin{Large} \textbf{TEXT}\end{Large}\\
\vspace*{.4cm}
\begin{LARGE} \textbf{TEXT}\end{LARGE}\\
\vspace*{1.5cm}
\begin{tikzpicture}[scale=2.5]
\definecolor{rucv}{rgb}{.88,0.077,.1}
\definecolor{bucv}{rgb}{.001,.086,.55}
\draw(2.6,.58)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{TEXT};
\draw(2.6,.3)node[color=bucv][font=\fontsize{20}{20}\sffamily\bfseries]{T\Large{EXT} \huge{T}\Large{EXT}};
\end{tikzpicture}
\vspace*{1cm}
\begin{LARGE} \textbf{"TEXT}\end{LARGE}\\
\vspace*{.5cm}
\begin{LARGE} \textbf{
TEXT"}\end{LARGE}\\
\vspace*{1cm}
\begin{large} TEXT:\end{large}\\
\vspace*{.6cm}
\begin{LARGE} \textbf{TEXT}\end{LARGE}\\
\vspace*{.8cm}
\begin{large}Elaborado por:\end{large}\\
\vspace*{.4cm}
\begin{Large} \textbf{Text}\end{Large}\\
\vspace*{.8cm}
\begin{large}Text:\end{large}\\
\vspace*{.4cm}
\vspace*{2cm}
\begin{Large} \textbf{TEXT}\end{Large}\\
\vspace*{.4cm}
\begin{Large} \textbf{2013}\end{Large}\\
\vspace*{.4cm}
\end{center}
\end{titlepage}
\tableofcontents
\newpage
\section{TITLE}
\section{TITLE}
\subsection{Subtitle}
\subsection{Subtitle}
\section{TITLE}
\lipsum
\subsection{Subtitle}
\subsection{Subtitle}
\subsubsection{Title}
\begin{easylist}
& Title
& Title
&& Subtitle
&&& Title
& Title
\end{easylist}
\subsubsection{Title}
\subsection{Subtitle}
\section{TITLE}
\subsection{Subtitle}
\subsubsection{Title}
\end{document}
\setlength{\headsep}{0pt}
looks a little odd.