如何将多个pdf合并为一个,每个输入pdf从一个偶数页开始? [英] How to concatenate multiple pdf as one, each input pdf starting on an even page?

查看:410
本文介绍了如何将多个pdf合并为一个,每个输入pdf从一个偶数页开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一系列的文档,每个文档的页数都无法预测.

I have a serie of documents, each one with an unpredictable number of pages.

说:

  • a.pdf(1页:A1)
  • b.pdf(3页:B1,B2,B3)
  • c.pdf(4页:C1,C2,C3,C4)

我想将这些输入文件合并为一个out.pdf,我将在其中进行双面打印.输入文件的每个首页都必须在首页(右侧)上.

I want to merge these input files into one out.pdf, that I'll print double-side. Every first page of the input files must be on a front (right) page.

这意味着预期结果将是

  |A1
--|B1
B2|B3
--|C1
C2|C3
C4|

-"为空​​白页.

当前,我使用的是pdftk猫.

Currently, I'm using pdftk cat.

似乎可以通过使用以下脚本来解决:

There seem to be a solution through heavy scripting, using :

# Get number of pages
pdftk x.pdf dump_data | grep "NumberOfPages"
# If the number of pages is odd, add a blank page to x.pdf
# Loop
# Cat the whole

我想知道是否可能有一个更简单的优雅解决方案?

I was wondering if there might be a more simple an elegant solution ?

例如,是否可以在每个文件的开头添加分页符?

For example, is it possible to add page-breaks at the begining of each file ?

预先感谢

推荐答案

这可以通过 TeX.SE );它使用的 pdfpages 包中有一个选项openright可能会自动实现您想要的.

This can be done with pdfjam (which uses TeX; see TeX.SE); the pdfpages package it uses has an option openright which can probably automatically achieve what you want.

这篇关于如何将多个pdf合并为一个,每个输入pdf从一个偶数页开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆