# A simple line from start of the page to the end

I need on one specific page a line from the very top to the end of the page (it is for folding).

Everything I tried so far stopped at the head/foot room.

Someone got an idea?

-
Please post what you have tried so far and we will correct it for you. We do not even know your documentclass and would have to guess around. You should always try to minimize the work, the helpers have to do for you. Just an advice. Welcome to the page, btw. – LaRiFaRi Aug 29 '14 at 14:27
I tryed some shananigans with tables, but they dont override the header and fooder. Also i tried a whole Box over the page, stolen this form the method of puting source code in my text. There i could set borders. But with the answers from Steven and Harish i am 100% sadisvied. @ Turion, thanks for the editing, my english isnt that good. – Fulli Sep 1 '14 at 6:55
Glad to hear. It would be good, if you mark your preferred answer by klicking on the check mark on the left. This will close this issue as it has been resolved. Thanks. – LaRiFaRi Sep 1 '14 at 7:08

Specializing my answer from What are the ways to position things absolutely on the page?, this MWE sets up the line on page two, because that is where the \atxy was invoked. The line is 6 inches from the left paper edge, as given in the \atxy arguments.

\documentclass{article}
\usepackage{everypage}
\usepackage{xcolor}
\usepackage{lipsum}
% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
\raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{\textcolor{red}{#3}}}}}
% VERIFIED THAT SETTING \hoffset AND \voffset DO NOT BREAK SOLUTION.
%\hoffset=0.4in
%\voffset=0.2in
\begin{document}
\lipsum[1-7]
\atxy{6in}{0in}{\rule[-11in]{1pt}{11in}}
\lipsum[8-12]
\end{document}


-
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz[overlay,remember picture]\draw[<->,red,dashed] ([xshift=3cm]current page.north west)-- ([xshift=3cm]current page.south west);

blablablabla
\end{document}

-
I dont know why but this solution didnt work in my document. – Fulli Sep 1 '14 at 7:01
@Fulli: Well it works in my example (after two compilations). So you will have to find out what's different in your document. – Ulrike Fischer Sep 1 '14 at 7:35
@ Ulrike: could it be the documentclass? i write in a paper not an article? – Fulli Sep 1 '14 at 7:46
@Fulli: I won't try to guess around without any information. Make a complete minimal example that demonstrates your problem and show it along with the log-file. Create a new question or add the informations to your question above. – Ulrike Fischer Sep 1 '14 at 7:52

Like this?

\documentclass{article}
\usepackage{eso-pic,graphicx}
\begin{document}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
\put(\LenToUnit{4cm},\LenToUnit{0cm}){#1}%
}}%
\AtPageUpperMyleft{\color{red}\rule[-\paperheight]{4pt}{\paperheight}}
}

Some text
\end{document}


Adjust the value 4cm in \LenToUnit{4cm} as you desire.

-
9 second difference ;-) – Ulrike Fischer Aug 29 '14 at 15:10
@UlrikeFischer I have a different method ;-) – Harish Kumar Aug 29 '14 at 16:12

Here is a variation/edit on Ulrike's solution (so please give her the tick!) to get the line to go down the centre of the page.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz[overlay,remember picture]\draw[red,dashed](current page.north)--(current page.south);

blablablabla
\end{document}

-
(current page.north) -- (current page.south)? – Manuel Aug 29 '14 at 15:37
@Manuel I thought this would work too but it doesn't: Package PGF Math Error: Unknown function north' (in 'north '). – Andrew Aug 29 '14 at 15:39
(current page.90) -- (current page.270)? I can't compile right now. – Manuel Aug 29 '14 at 15:41
@Manuel I am very confused as it is working now... Will edit. I'm sure that I tried this earlier too before resorting to using the calc library. Whatever... – Andrew Aug 29 '14 at 15:43
Ah, space matters here: when I first tried this I had (current page.north ) and the space after north` leads to the error above... – Andrew Aug 29 '14 at 15:55