How do I remove some pages of a .pdf file? I tried some tips mentioned in different websites, but to no avail.

  • 5
    It would be helpful to mention what "tips" exactly you've tried so you don't get the same suggestions over again.
    – slhck
    Dec 11, 2012 at 19:32

11 Answers 11


You can use command line tools pdftk and qpdf for this purpose. They are available on Windows, Linux and MacOS.

Use scoop to install them easily on Windows:

scoop install pdftk
scoop install qpdf

Here is the example of the code to keep only pages 1-9 and 26-end of the original file input.pdf and save them to outputfile.pdf.:

pdftk example: (taken from here)

pdftk input.pdf cat 1-9 26-end output outputfile.pdf

qpdf example:

qpdf input.pdf --pages . 1-9,26-z -- outputfile.pdf 
  • 4
    there is also a Chooloatey package for pdftk and qpdf
    – Foad
    Jan 8, 2019 at 9:35
  • 1
    What is the -z parameter for qpdf? Does this refer to the last page, without needing to know the exact number?
    – shevy
    Mar 29, 2020 at 17:05
  • Yes, z means end page, see here: qpdf.sourceforge.net/files/qpdf-manual.html Mar 29, 2020 at 17:52
  • 1
    Also available on macOS using homebrew
    – moo
    Nov 26, 2023 at 19:53
  • 1
    I noticed that pdftk would not maintain the metadata (title/author/subject/application/pdf producer/etc.), so if you need this qpdf is the better choice.
    – hanjo
    Mar 15 at 8:18

You can use any PDF editor, or if you don't want to download/install anything big, use the command-line portable pdftk (PDF Toolkit). Just extract the EXE and DLL to the same directory as your PDF, then from the command prompt use a command similar to the following:

pdftk in.pdf cat 1-12 14-end output out.pdf

This will delete page 13 from the PDF. See the man(ual) and examples pages for more help/options, or just type pdftk --help.

  • You can search for PDFTK portable version for a GUI version without installatoin.
    – Kenneth L
    Jan 3, 2016 at 14:32
  • I wish there were a command to remove certain pages. that would be way more easier IMO.
    – Foad
    Jan 8, 2019 at 9:32
  • For what's it worth, I found qpdf to work better than the java-based toolkits. Dunno why but I tend to work closer to the C/C++ software stack and oldschool UNIX philosophy. Your mileage may vary, obviously. :)
    – shevy
    Mar 29, 2020 at 17:05

I've used PDF SAM (Split And Merge) ( http://www.pdfsam.org/ ) numerous times and it works well.

It's a free Java app, so you will need Java installed. It allows PDFs to be extracted to single pages and then reattached back again.

  • This works fine, I just wish they would add something like Adobe Acrobats "organize pages" were one could easily remove, add, rotate or reorder pages.
    – Foad
    Jan 8, 2019 at 9:32
  • Visually selecting and then removing pages is now a premium-only feature :-(.
    – Sixtyfive
    Oct 15, 2020 at 12:46

Another option is to use a PDF printer (e.g. CutePDF ( http://www.cutepdf.com/ ) )

"Print" your PDF to another PDF making sure to choose only the pages you want from the print dialog.

  • 3
    Many OS have a PDF printer installed by default.
    – adam.r
    Sep 22, 2018 at 21:19
  • 1
    If you do this, everything gets rendered as an image. Which may be okay for your use case Oct 8, 2023 at 0:02

Sejda is a new "Advanced Online Manipulation Tool" that has the ability to split a PDF document at the page number that you wish. It also has numerous other abilities:


To remove pages, use the Extract task. Select all page but the ones you wish removed, and click "Extract".

You can select multiple pages at once pressing SHIFT

Extract PDF pages using sejda.com


Pdf printer drivers, as in Foxit, will convert your original pdf file, but may result in a different quality, or much larger file, when using high quality print.

Alternatively, it is recommended to simply cut off pages, from the original pdf file, without converting it.

This online tool does it very well: http://smallpdf.com/split-pdf

 1. Upload your file with drag and drop or press Choose file.
 2. Select the pages you want to save into a new file.
 3. Press the Split PDF button and download your file.


Another commercial option is using Ricoh's Print&Share:

There are several ways to "remove" pages. Easiest option:

  1. Print your pdf document or other document to Print&Share
  2. Go to the Print&Share pages overview by clicking that icon in the upper right corner: Ricoh Print&Share pages overview
  3. Deselect the pages that you don't want: Ricoh Print&Share deselect pages
  4. Click the Send and Close button. Ricoh Print&Share Send and Close

Now it is also possible to deselect pages based on conditions and automatically instead of doing it manually. This can be for example if the page contains too much color or too much white space or if it contains certain words, or specific page ranges, etc... The page selection options can be found here: Ricoh Print&Share advanced page selection


The free foxit reader comes with a pdf printer that allows you to print (ranges of) pages to a pdf file. And it's a great alternative to Adobe Reader.


Removing pages of a pdf

This uses the package pdftk . To Download the file you first pull it off the web.

cd ~
cd Downloads/
wget "https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_free-2.02-win-setup.exe"

Then you install the package


To find where the executable file was saved, use the where command

where pdftk

To add the pdftk to your path, add it to ./bashrc and source it

echo 'alias pdftk="C:/Program\ Files\ \(x86\)/PDFtk/bin/pdftk.exe" ' >> ~/.bashrc
source ~/.bashrc

Now cd to the file of interest is

cd /d/Documents/BoxSync/Classes_Spring2021/Advanced_Biostatistics_EEB590C/Lectures/

The actual commands for removing pages are below. The format is "pdftk {input.pdf} cat 1-9 26-end output {outputfile.pdf}" In this example the input.pdf and outputfile.pdf are what you change and the numbers of the pages we are keeping are 1-9 and 26 until the end of the document.

#pdftk input.pdf cat 1-9 26-end output outputfile.pdf

pdftk 10_Multivariate_Association_and_Canonical_Ordination_Methods.pdf cat 1-40 43-end output 10_Multivariate_Association_and_Canonical_Ordination_Methods_altered.pdf
  • 2
    This seems very complicated for a Windows system. In what ways is it superior to the answers already given? Mar 30, 2021 at 21:50

PDF CPU is a good option.

Begin with 3 instances of page 1 then append the rest of the file excluding the last page:

pdfcpu collect -pages 1,1,1,2-l-1 in.pdf out.pdf



A free for personal use cross platform (plus several APIs) alterative to the previous answers is cpdf https://community.coherentpdf.com/.

Like many other command line tools it does not display the files, but you should have used a PDF reader to check the file is valid and determine pages to remove, or know their positions.

The manual shows that to remove pages three, four, five and six from a document =

cpdf in.pdf 1,2,7-end -o out.pdf

The ranges can thus be easily applied, by excluding pages to be deleted, or conversely you are listing those to be retained.

It has many, many, more functions, including make PDF lines thicker / thinner that many other tools cannot do.

You must log in to answer this question.

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