Stapler: 从命令行处理 PDF 文档

Stapler 是一个用于处理 PDF 文档的命令行工具,因其为纯 Python 实现,所以比 Java 实现的 PDFtk 更轻巧,可作为后者的替代品使用。

目前,Stapler 包括合并 PDF、分割 PDF、删除 PDF 中的页面等功能。兹举一例来说明 Stapler 的用法。

假设你想要将 1.pdf 和 2.pdf 合并为一个单独的 PDF 文档 out.pdf,则可以执行以下命令:

stapler cat 1.pdf 2.pdf out.pdf

Stapler 的其他用法可通过执行不带参数的 stapler 命令获得,大都一目了然,只需依照做即可。

Stapler 的源代码可通过 github 取得。

Read More:

  • » No related posts

17 Comments

  1. 1 Cong Commented @ 2010-05-21 11:53Reply to this comment

    ghost script不也行嘛

  2. 2 wonseberg Commented @ 2010-05-21 13:27Reply to this comment

    还不如tex方便

  3. 3 沈觅仁 Commented @ 2010-05-21 13:45Reply to this comment

    有虚拟终端下(framebuffer)查看PDF的工具么?

  4. 4 neoanima Commented @ 2010-05-21 13:57Reply to this comment

    linux下面,整来整去,整来整去,pdf操作都是什么分割,合并,删除的功能,也不好好开发个可注释pdf的软件,原生的注释,像adobe acrobe那样的。

  5. 5 eagle Commented @ 2010-05-21 14:19Reply to this comment

    @neoanima: linux下面,就是,整来整去,整来整去

  6. 6 liusp Commented @ 2010-05-21 14:22Reply to this comment

    @eagle: +1

  7. 7 TriMeow Commented @ 2010-05-21 14:53Reply to this comment

    Linux下的PDF编辑软件太差了,我都是用Wine的Foxit Platinum

  8. 8 glicn Commented @ 2010-05-21 15:55Reply to this comment

    有个文献管理软件叫mendeley,自带的阅读器可以注释,也可以高亮标记,还可以把你标示的注释以pdf输出。这个软件跨平台且免费,可以很好的支持tex,openoffice,不过好像不支持ws office

  9. 9 syrano Commented @ 2010-05-21 15:59Reply to this comment

    @沈觅仁: fbi

  10. 10 stevenlee.net Commented @ 2010-05-21 16:05Reply to this comment

    @glicn: 感谢推荐

  11. 11 simaopig Commented @ 2010-05-21 16:51Reply to this comment

    不能查看。。呼。。

  12. 12 wlx Commented @ 2010-05-21 23:45Reply to this comment

    @glicn:感谢推荐,这个也支持ZOTERO同步,不错

  13. 13 xRAIN Commented @ 2010-05-24 12:09Reply to this comment

    没办法, 都是wine下用 foxit pdf pro2.0, 用很久了.

  14. 14 alex Commented @ 2010-05-24 15:42Reply to this comment

    注释,真的很难。。

  15. 15 黑传说 Commented @ 2010-05-24 17:13Reply to this comment

    @neoanima: 个人认为,与其开发一个可以原生注释的,还不如直接宣判pdf死刑。有网页这种更开放、更跨平台的格式存在,要pdf何用?

  16. 16 Twando Commented @ 2010-05-24 17:21Reply to this comment

    @黑传说: 数学文档还是离不开pdf。

  17. 17 黑传说 Commented @ 2010-05-24 17:27Reply to this comment

    @Twando: 数学文档更应该远离pdf,公式应该能够直接计算运行(当然,前提是调用了相关资源),而pdf需要重新转为文字之后才根据格式进行运算,而网页本身就直接可以用文字形式来记数学公式,同样的需要加入对格式的参考来运算。——当然,目前好像没相关的公式编辑器,所以只是理论上说。