需要将多个pdf合并到带有目录部分的单个PDF中 [英] Need to merge multiple pdf's into a single PDF with Table Of Contents sections

查看:470
本文介绍了需要将多个pdf合并到带有目录部分的单个PDF中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将使用php脚本生成50-100个单个PDF. PDF通常分为10到20组.每个小组都需要拥有自己的目录或索引,然后在开始时还需要有一个主目录或索引.

Will have 50-100 single PDF's that we'll be generating with a php script. PDF's are generally grouped into groups of 10-20. Each group needs to have it's own Table of Contents or Index, and then there also needs to be a Master Table of Contents or Index at the beginning.

或者,如果太难了,我们可以一开始就摆脱一个目录.

Or if that is too difficult we could get away with a single Table of Contents at the beginning.

解决此问题的最佳方法是什么?

What's the best way to go about this?

我们将需要创建目录,然后将其导出为PDF并将其附加到开头,然后将其余文件混在一起吗?还是有更好的解决方案?

Will we need to create the Table of Contents and then export that to PDF and append it to the beginning and mash the rest of the files after that? Or is there a better solution?

对我们来说,合并pdf的最佳工具是什么?

And what's the best tool for us to merge the pdf's?

将在Linux服务器上运行.

Will be running on a Linux server.

推荐答案

对我们来说,合并pdf的最佳工具是什么?

And what's the best tool for us to merge the pdf's?

在Linux(以及Windows)上,您可以安装一个有用的小程序

On Linux (as well as on Windows), you can install an useful little program, pdftk. It works well to bind PDF's together. For example:

$ pdftk in1.pdf in2.pdf in3.pdf in4.pdf in5.pdf in6.pdf cat output out.pdf

其中in*.pdf是输入文件,而out.pdf是结果.在这之间,@ jerik已经给一个答案如何处理TOC.

where in*.pdf are the input files and out.pdf is the result. In between, @jerik already gave an answer how to deal with the TOC.

这篇关于需要将多个pdf合并到带有目录部分的单个PDF中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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