Skip to content

Instantly share code, notes, and snippets.

@cassc
Last active October 17, 2020 10:56
Show Gist options
  • Save cassc/9f658ff7ae102fb7f4ce0fd9e04f0e10 to your computer and use it in GitHub Desktop.
Save cassc/9f658ff7ae102fb7f4ce0fd9e04f0e10 to your computer and use it in GitHub Desktop.
Trim/Crop PDF file with LaTeX
\documentclass[12pt,oneside,a4]{article}
\usepackage{forloop}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{pdfpages}
\setlength{\parindent}{0pt}
\begin{document}
\thispagestyle{empty}
\newcounter{ct}
\forloop{ct}{1}{\value{ct}<363}{
\includepdf[trim=1cm 3cm 1cm 2cm, pages={\arabic{ct}}]{input.pdf}
}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment