# How can make this header to be on every page?

I want the number 510000000 to be on every page on the top right corner what command do I use? Thank you in advance.

    \documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
%% Graphics
\usepackage{graphicx}
\usepackage{everypage}
\usepackage{lipsum}

\usepackage{pdfpages}
\usepackage{eso-pic}
\usepackage{lipsum}

\AtPageUpperLeft{%
\hspace{\paperwidth}%
\raisebox{-\baselineskip}{%
\makebox[0pt][r]{510000000}
}}}%

% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
\raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{#3}}}}
% VERIFIED THAT SETTING \hoffset AND \voffset DO NOT BREAK SOLUTION.
%\hoffset=0.4in
%\voffset=0.2in
\atxy{0.1in}{0.1in}{\raisebox{-\height}{\includegraphics[height=0.53in]{logo.jpg}
}}
\begin{document}
%% Titlepage
\vspace*{.2in}
\lipsum[1]
\includepdf{Plagiarism.pdf}

\title{Lab Report}

\end{document}

• top right corner is not pretty well-defined. Using fancyhdr this can be very easy
– user31729
Aug 5 '16 at 18:29
• Could you possible tell me the code I would really appreciate it. Thank you. Aug 5 '16 at 18:32

Use fancyhdr.

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
foo
\end{document}


I changed your document in 2 ways. I replaced the \includegraphics in the \atxy argument #3 with text, and I increased the value of the 1st argument to \atxy (to a value of \dimexpr\paperwidth-.7in) to shift the block to the right.

\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
%% Graphics
\usepackage{graphicx}
\usepackage{everypage}
\usepackage{lipsum}

\usepackage{pdfpages}
\usepackage{eso-pic}
\usepackage{lipsum}

% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%