Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2009 01:30:42 +0100
From:      cpghost <cpghost@cordula.ws>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: can i split a pdf file?
Message-ID:  <20090126003042.GA5314@phenom.cordula.ws>
In-Reply-To: <20090126001822.GA38314@thought.org>
References:  <20090126001822.GA38314@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 25, 2009 at 04:18:26PM -0800, Gary Kline wrote:
> 	Folks,
> 
> 	Is there a way to split a large pdf file into smaller [ say 1MB ]
> 	chunks?  Or are there open source tools out there that i can
> 	build?  
> 	
> 	thanks in advance,
> 
> 	gary

To split the file, use split(1):

  $ split -b 1M file.pdf file-chunk

See "man split".

But you won't be able to view the chunks separately,
because, well, they aren't PDF files anymore. ;-)
For this, you'd prefer to split the PDF file after
N pages. You may want to investigate print/pdftk:

>From /usr/ports/print/pdftk/pkg-descr:

  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
  Decrypt Input as Necessary (Password Required)
  Encrypt Output as Desired
  Burst a PDF Document into Single Pages
  Report on PDF Metrics, including Metadata and Bookmarks
  Uncompress and Re-Compress Page Streams
  Repair Corrupted PDF (Where Possible)
  
  Pdftk is also an example of how to use a library of Java classes
  in a stand-alone C++ program. Specifically, it demonstrates how GCJ and CNI
  allow C++ code to use iText's (itext-paulo) Java classes.
  
  WWW: http://www.accesspdf.com/pdftk/

There are also other less heavy-weight programs to extract
pages and page-ranges from a PDF and PostScript file...

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090126003042.GA5314>