Skip to content

Instantly share code, notes, and snippets.

@gwpl
Created April 21, 2023 09:49
Show Gist options
  • Save gwpl/942ebc7720f8a844f12ac1269d035592 to your computer and use it in GitHub Desktop.
Save gwpl/942ebc7720f8a844f12ac1269d035592 to your computer and use it in GitHub Desktop.
Clean Ink CMYK printer heads with color pages.
\documentclass{article}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{paperwidth=21cm,paperheight=29.7cm,margin=0cm}
\definecolor{cyan}{RGB}{0,255,255}
\definecolor{magenta}{RGB}{255,0,255}
\definecolor{yellow}{RGB}{255,255,0}
\begin{document}
% Page 1: 4 squares
\noindent
\textcolor{cyan}{\rule{3cm}{3cm}}%
\textcolor{magenta}{\rule{3cm}{3cm}}\\[1cm]
\textcolor{yellow}{\rule{3cm}{3cm}}%
\textcolor{black}{\rule{3cm}{3cm}}
% Page 2: cyan
\clearpage
\pagecolor{cyan}
\newgeometry{top=0cm,bottom=0cm,left=0cm,right=0cm}
\mbox{}
% Page 3: magenta
\clearpage
\pagecolor{magenta}
\newgeometry{top=0cm,bottom=0cm,left=0cm,right=0cm}
\mbox{}
% Page 4: yellow
\clearpage
\pagecolor{yellow}
\newgeometry{top=0cm,bottom=0cm,left=0cm,right=0cm}
\mbox{}
% Page 5: black
\clearpage
\pagecolor{white}
\newgeometry{top=0cm,bottom=0cm,left=0cm,right=0cm}
\textcolor{cyan}{\rule{\paperwidth}{\paperheight}}%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment