You have to specify a proper margin for the page. I have set a margin of 0in
.
\documentclass{article}
\usepackage[paperwidth=18cm,paperheight=26cm,margin=0in]{geometry} %% specify equal margin
%\usepackage[a4,frame,center,noinfo]{crop} %% not needed
\usepackage{tikz}
\begin{document}%
\thispagestyle{empty}%
\topskip0pt
\baselineskip0pt
\vspace*{\fill}%
\noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}%
\vspace*{\fill}%
%% to confirm the center
\begin{tikzpicture}[remember picture,overlay]
\node[scale=3,text=red] at (current page.center) {X};
\end{tikzpicture}
\end{document}

The red X
is the just to show the center. To be on safer side, you may set headheight
, headsep
and footskip
also to be zero. You may do so in
\usepackage[paperwidth=18cm,paperheight=26cm,margin=0in,headheight=0in,headsep=0in,footskip=0in]{geometry}
A tikz
solution:
\documentclass{article}
\usepackage[paperwidth=18cm,paperheight=26cm,margin=0in]{geometry} %% specify equal margin
%\usepackage[a4,frame,center,noinfo]{crop} %% not needed
\usepackage{tikz}
\begin{document}%
\begin{tikzpicture}[remember picture,overlay]
\draw[olive, line width=8pt] (current page.south west) rectangle (current page.north east);
\draw[red, line width=0.4pt](current page.west) -- (current page.east);
\node[scale=3,text=red] at (current page.center) {X}; %%% uncomment just for demo
\end{tikzpicture}
\end{document}
