15

Didn't see an option in the menus or any documentation on what I imagine is something simple:

I have a multi-page PDF and want to delete a specific page within Okular's GUI.

Wolf
  • 1,477
  • 7
  • 17
  • 29

6 Answers6

18

There is no way to remove a page in Okular. However, it can refresh modified PDF document automatically so there is no need to re-open the document manually after modifying it in external tool such as pdftk. To remove a given page use cat option and specify a range of pages you'd like to keep in the target PDF file. For example, if you want to remove 5th page in document.pdf execute the following command:

pdftk document.pdf cat 1-4 6-end output out.pdf && mv out.pdf document.pdf
Arkadiusz Drabczyk
  • 25,049
  • 5
  • 53
  • 68
4

I always try to reduce the dependency-trail of my installed packages. For pdftk I would have to install 16 additional Java dependencies on my Gentoo system ...

So (at least for completeness sake) I wanted to point out, that you can use Ghostscript for this task. It is preinstalled on most Linux systems.

Let's say you want to delete page 2,7,9 and 14 of you document:

gs -sPageList=1,3-6,8,10-13,15- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER  -sOutputFile=myPDF_out.pdf myPDF.pdf

The trailing dash after 15 indicates, that you want to keep all the pages from 15 to the end of the document.

So if you want to delete only page 5 you would issue:

gs -sPageList=1-4,6- -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER  -sOutputFile=myPDF_out.pdf myPDF.pdf

(Be aware that page numbers have to be in ascending order)

m4110c
  • 183
  • 1
  • 6
4

If you want an easy GUI solution, I have found PDF Arranger to be really valuable and end user compatible. With it you can merge, join, split, extract, delete and insert single pages from PDF documents, and all using the mouse.

And it's just 300kB.

sudo apt install pdfarranger

Jens
  • 228
  • 1
  • 6
3

Use LibreOffice "draw" to open the pdf file, delete the pages you want and then EXPORT it as a pdf.....done.

Iscream
  • 31
  • 1
3

LibreOffice draw didn't work for me, as it munted the formatting. However, Xournal allowed me to remove (and re-arrange) pages while preserving the original document formatting.

nodnarb
  • 31
  • 3
0

If you want to delete pages from the start or end of the document, using Okular:

  1. Menu File > Print
  2. For Name select Print to File (PDF)
  3. Expand Options >>
  4. Select Pages from [_] to [_]
  5. Increase the first number to skip pages at the start
  6. Decrease the second number to skip pages at the end
  7. You can keep Output file as the current filename, if you like. (After writing the file, Okular will reload it automatically.)
  8. Hit Print
joeytwiddle
  • 1,008
  • 9
  • 15