在Linux上分割PDF文件

    最近在学习新技术,下到的一个PDF文档有20多M,想放手机上看,直接说存储空间不足—其实我猜是内存不足才对,因为文件我是放卡上的。无论如何,需求就是,把这个大文件分割成几个小的,这样就可以在手机上看了。
    随便一google,就查到了ptftk,它能够做到的不仅仅是分割PDF而已,可以看其主页上的介绍:
===============================================================================================

If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to:

  • Merge PDF Documents

  • Split PDF Pages into a New Document

  • Rotate PDF Pages or Documents

  • Decrypt Input as Necessary (Password Required)

  • Encrypt Output as Desired

  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms

  • Apply a Background Watermark or a Foreground Stamp

  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels

  • Update PDF Metadata

  • Attach Files to PDF Pages or the PDF Document

  • Unpack PDF Attachments

  • Burst a PDF Document into Single Pages

  • Uncompress and Re-Compress Page Streams

  • Repair Corrupted PDF (Where Possible)

===============================================================================================
    其基本用法在主页上也有举例,我这里就举一个能满足我需求的命令吧:
pdftk A=Eclipse.Plug-ins.Third\ Edition.Dec.2008.pdf cat A1-217 output plugin1.pdf
把“Eclipse.Plug-ins.Third\ Edition.Dec.2008.pdf”这个文件的第1到217页(1-4章)分为plugin1.pdf文件。命令语法很简单,就不讲了,可以直接去主页上看或者看命令的帮助。分开的文件不到7M,手机上面可以直接打开。

Tags: , ,

One Comment

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>