5

This problem is related to my previous problem about pdf trimming.

Here is the minimal code:

\documentclass{article}
\usepackage{pdfpages}
\usepackage[paperwidth=6.38in,paperheight=4.025in,margin=0mm]{geometry}
\newlength{\mylength}
\setlength{\mylength}{0.7in}
\usepackage{multido}
\begin{document}
\multido{\i=50+1}{10}%
{%
    \ifthenelse{\isodd{\i}}%
    {%
            \includepdf[pages=\i,trim=\mylength 4.325in 0.3in 0.9in,clip]{MVC}%
            \pagebreak          
            \includepdf[pages=\i,trim=0.7in 0.4in  0.3in 4.825in,clip]{MVC}%
    }%
    {%
            \includepdf[pages=\i,trim=0.3in 4.325in 0.7in 0.9in,clip]{MVC}%
            \pagebreak      
            \includepdf[pages=\i,trim=0.3in 0.4in  0.7in 4.825in,clip]{MVC}%
    }%
}%
\end{document}

The pdf file to be trimmed is available here. I rename the pdf as MVC.pdf and save it in the same directory in which the tex input file above is saved.

I compiled and got blank pages.

Display Name
  • 46,933

1 Answers1

6

You can use

\includepdf[pages=\i,trim=\mylength{} 4.325in 0.3in 0.9in,clip]{MVC}%

or

\includepdf[pages=\i,trim={\mylength} 4.325in 0.3in 0.9in,clip]{MVC}%

What is important is that the space after \mylength is not eaten by TeX.