How do I remove some pages of a .pdf file? I tried some tips mentioned in different websites, but to no avail.
19 Answers
You can use command line tools pdftk and qpdf for this purpose. They are available on Windows and linux.
Use scoop to install them easily on Windows:
scoop install pdftk
scoop install qpdfHere 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.pdfqpdf example:
qpdf input.pdf --pages . 1-9,26-z -- outputfile.pdf 3 I've used PDF SAM (Split And Merge) ( ) 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.
2You 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.pdfThis will delete page 13 from the PDF. See the man(ual) and examples pages for more help/options, or just type pdftk --help.
Another option is to use a PDF printer (e.g. CutePDF ( ) )
"Print" your PDF to another PDF making sure to choose only the pages you want from the print dialog.
1Sejda 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
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:
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:
- Print your pdf document or other document to Print&Share
- Go to the Print&Share pages overview by clicking that icon in the upper right corner:
- Deselect the pages that you don't want:
- Click the Send and Close button.
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:
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 ""Then you install the package
./pdftk_free-2.02-win-setup.exeTo find where the executable file was saved, use the where command
where pdftkTo 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 ~/.bashrcNow 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.
#example
#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 1 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.