Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to find out the easiest way to replace a single page in a multiple page pdf with another single page pdf in linux. What tool is best for this ?

Currently I do it like this:

  1. split pdf to single pages using pdfsam
  2. replace the pages that I want to replace
  3. merge them using pdfsam
  4. using ghostscript to force the page size as same

Any better way?

share|improve this question
up vote 16 down vote accepted

You could use the PDF Toolkit PDFtk:

Example:

pdftk A=inA.pdf B=inB.pdf cat A1-12 B3 A14-end output out1.pdf

The output consists of the first 12 pages of inA.pdf, followed by page 3 of inB.pdf and then pages 14 until end of inA.pdf.

Many Linux distributions provide a PDFtk package you can download and install using their package manager.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .