将 PDF 小册子分成几页

将 PDF 小册子分成几页

我有一个 PDF,里面有小册子样式的页面(如下图所示)。我想打破这些PDF A4 页面回到原来的PDF A5 页面数量增加一倍

|-------| PDF page 1
| 8   1 |
|-------|

|-------| PDF page 2
| 2   7 |
|-------|

|-------| PDF page 3
| 6   3 |
|-------|

|-------| PDF page 4
| 4   5 |
|-------|

答案1

tikz这是通过和解决的graphicx。需要进行两次编译。gen.pdf是您的小册子 PDF 文件。

\documentclass[a5paper]{article}
\usepackage{geometry}
\usepackage{tikz}
\pagestyle{empty}
\begin{document}
\foreach \page in {1,...,4}{
  \begin{tikzpicture}[overlay,remember picture]
    \ifodd\page
    \node at (current page)
    {\includegraphics[page=\page,trim=148.5mm 0 0 0]{gen.pdf}};
    \else
    \node at (current page)
    {\includegraphics[page=\page,trim=0 0 148.5mm 0]{gen.pdf}};
    \fi
  \end{tikzpicture}
  \newpage
}
\foreach \page in {4,...,1}{
  \begin{tikzpicture}[overlay,remember picture]
    \ifodd\page
    \node at (current page)
    {\includegraphics[page=\page,trim= 0 0 148.5mm 0]{gen.pdf}};
    \else
    \node at (current page)
    {\includegraphics[page=\page,trim= 148.5mm 0 0 0]{gen.pdf}};
    \fi
  \end{tikzpicture}
  \newpage
}
\end{document}

答案2

通过以下方式修改解决方案波尔加布,我去掉了tikzpicture在我看来完全不必要的部分,并且我tikz只使用它\foreach

\documentclass[a5paper]{article}
\usepackage[margin=0pt]{geometry}
\usepackage{tikz}
\pagestyle{empty}
\def\placepage#1{%
\leavevmode\kern-0.25in{#1}%
}
\begin{document}
\foreach \page in {1,...,4}{
    \ifodd\page
    \placepage{\includegraphics[page=\page,trim=148.5mm 0 0 0]{y.pdf}}
    \else
    \placepage{\includegraphics[page=\page,trim=0 0 148.5mm 0]{y.pdf}}
    \fi
  \newpage
}
\foreach \page in {4,...,1}{
    \ifodd\page
    \placepage{\includegraphics[page=\page,trim= 0 0 148.5mm 0]{y.pdf}}
    \else
    \placepage{\includegraphics[page=\page,trim= 148.5mm 0 0 0]{y.pdf}}
    \fi
  \newpage
}
\end{document}

答案3

...下面是如何借助 Ghostscript 实现此目的的详细说明:

相关内容