a script to combine pdf files

a python script to combine pdf files together, based on user's sort option

I download some pdf files online, they are seperated pieces from a ebook, I need to combine them togehter to make the book as a whole.

There are lots method to combine, but in Mac I found preview is not handy, and join.py is the default script in Mac to do the trick, it is located at
/System/Library/Automator/CombinePDFpages.action/Contents/Resources/join.py

I need to combine all the pdf in a folder based on time ascending order, I found a script but it does not have what I need, so I decided to write one.

Here it is

source

source

ReadMe

functions

Merge pages from a a collection of PDF files into a single PDF file.

usage

<pre><code>
./mergepdf.py [--path <path containing pdf files to merge>] [--sort <sort the pdf files in source directory by: name/date asc/decending order>] [--output] [--output path and file name]
</code></pre>

example usage

<pre><code>
./mergepdf.py --path ~/Desktop/test/ --sort nameasc --output ~/Desktop/merge.pdf
</code></pre>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容