Created
February 28, 2024 21:32
-
-
Save GrantTrebbin/89e6d9a5f17e82e843a857bbe678c1c5 to your computer and use it in GitHub Desktop.
Resise PDF and add page numbers with LaTeX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% pdfbind.tex | |
\documentclass[10pt,a4paper,twoside]{report} | |
\usepackage[final]{pdfpages} | |
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} | |
\usepackage{fancyhdr} | |
\usepackage{lastpage} | |
\pagestyle{fancy} | |
\fancyhead{} % clear header | |
\fancyfoot{} % clear footer | |
\setlength{\headheight}{18pt} | |
\fancyhead[C]{\Large\textsf{Left Title \hfill Centre Title \hfill Right Title}} | |
\fancyfoot[CE,CO]{\Large\textsf{Page \thepage \hspace{1pt} of \pageref{LastPage}}} % add page numbers to pages | |
% remove bars from top and bottom of page | |
\renewcommand{\headrulewidth}{1pt} | |
\renewcommand{\footrulewidth}{1pt} | |
\begin{document} | |
\includepdfset{offset=0mm 0cm, pagecommand=\thispagestyle{fancy}} | |
\includepdf[fitpaper=true,scale=0.85,pages=-]{printer-testcard-colour.pdf} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment