title_body: How can I use pdftk to make changes to my PDF ebooks?
upvoted_answer: pdftk, the PDF toolkit, is a program that has been around since 2004, and is available for multiple platforms: Windows, Linux, OSX. Although you could probably compile (it is open source) and run it on some (Android based) ebook readers, it is more intended to be run on your main computer, to change files before loading them onto your ebook reader.
  pdftk can do a lot of things out-of-the-box: collate scanned PDF pages (including handling reverse ordered back sides); decrypt and encrypt PDFs; joining and splitting of PDFs; removing of pages; rotating (90° increments) of pages; reporting on PDF metatdata and bookmarks.
  pdftk is built on top of the iText java library. It's development history is documented by its revision history.
  Installation
  Windows
  For Windows (XP, Vista, 7, 8), use the installer that you can get directly from the pdftk pages at PDF Labs. Run the executable installer, you should select the option [Don't create a Start Menu Folder]², but make sure you leave [Add application directory to your environment path] selected.
  Now you can open the Command Prompt (in the &quot;Accessories&quot; program group) and type³:
  pdftk --version
  
  to make sure the program is correctly installed. You can now use the examples provided in the answers that were mentioned in the question.
  OSX
  You can download the Mac OS X installer (for Snow Leopard, Lion and Mountain Lion) from pdftk pages at PDF Labs, or use homebrew-cask as explained in this StackOverflow answer:
  brew cask install pdftk
  
  After that, open a Terminal and type
  pdftk --version
  
  to make sure the program is correctly installed. You can now use the examples provided in the answers that were mentioned in the question.
  Linux
  Most Linux distributions include pdftk, try
  sudo apt-get install pdftk
  
  or
  sudo yum install pdftk
  
  or pick another installer appropriate to the distribution.
  After installation, open a terminal (if not already open for the installation process) or switch to a console (Ctrl+Alt+F1) and type:
  pdftk --version
  
  to make sure the program is correctly installed. You can now use the examples provided in the answers that were mentioned in the question.
  Usage
  pdftk is not hindered by a graphical user interface, therefore it is easy to automate repetitive tasks⁴. The examples in the answers, e.g.:
   pdftk *.pdf cat output ../combined.pdf
  
  (to combine multiple PDF files in one file), can be copied and pasted from your web browser into your command prompt/terminal.
  To find out about other easy ways to manipulate your PDF files, try:
  pdftk --help
  
  or have a look at the manual pages.
  When in a hurry, and only having to do things once, it is sometimes easier to burst a while PDF into individual pages with:
  pdftk in.pdf burst
  
  then remove the pages you don't need anymore, or rearrange them by renaming them, and then combine them using:
  pdftk pg_*.pdf cat output out.pdf
  
  (this combines the pages in alphabetical order so if you want the original page 2 to go after page 3, just rename pg_0002.pdf to pg_0003a.pdf).
  ¹ If you don't mind doing repetitive tasks moving a mouse around, there is also a GUI based version of the program: PDFtk Free
  ² That only creates a superfluous entry in the Program menu with an Uninstall option, you can do that from the &quot;Add/Remove Programs&quot; in the Control Panel
  ³ If you are not familiar with using the commandline: you have to type the characters shown and at the end of the line press Enter
  ⁴ For instance by calling it from a batch file, a shell script or (my favourite) a Python program