I have a PDF book that I want to remove a few pages from to reduce the file size. My normal solution to this didn't work, and when I tried others they introduced new problems:

  • I usually use PDF Arranger for this, which is normally a great tool. However, when I try it on this particular document I get an error I've never seen before (invalid literal for int() with base 8: b'228')
  • I can use pdftk to remove the pages, but the file size of the resultant document is more than double that of the original, which defeats the purpose of removing the pages in the first place
  • I can also use the Print to File command to remove the correct pages, but then I get a huge margin around the pages, with a smaller font and more whitespace, making the file harder to read

As you can see, it's surprisingly tricky to remove pages while otherwise leaving the document the same. Any advice on other solutions, or figuring out what's going on with these, would be much apreciated!

  • Have you tried community.coherentpdf.com? – Arkadiusz Drabczyk Apr 15 '20 at 19:24
  • Hadn't heard of it! I downloaded it but couldn't figure out how to install it. I found the cpdf executable for Linux x64, but when I run it from the terminal I just get a license warning. – pez Apr 15 '20 at 19:34
  • Type --help or see the examples on the website: cpdf in.pdf 1-3,12-end -o out.pdf – Arkadiusz Drabczyk Apr 15 '20 at 19:36
  • I can't get the cpdf command to be recognized by the terminal. – pez Apr 15 '20 at 19:38
  • You have said that you can run it in your previous post. It's not the terminal that recognizes the commands. To run pdf cd to Linux-Intel-64bit or Linux-Intel-32bit and run it ./cpdf – Arkadiusz Drabczyk Apr 15 '20 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.