Ubuntu – How to Edit PDFs

pdf

I typically have two needs:

Scenario A. Change a single PDF page.

In this case I have a PDF but not the original source file used to create the PDF. I don't want to try to recreate the document from scratch. I'd like to open the PDF and change a few things. A good example of this scenario: I was responsible for planning a big event at a campground site, I had a PDF of the site. I wanted to start with that document, highlight some parts, add some labels, remove some parts that weren't relevant.

or

Scenario B. Combine PDFs or extract page(s) from a PDF

This scenario usually arises because I want a single PDF deliverable that is made up of parts that are best created in different programs. In this case I have the source files for all the documents but they don't play well enough together to easily create a single PDF deliverable. For part of it, I may want to use Libre Office Writer. For another page I may want to use Gimp. Still another page I may use Libre Office Calc. I could use Writer as the master document and embed images or the Calc object into that, but for ultimate control, you can't beat separate PDF documents that are then combined.

What are the best tools / processes for editing PDFs in Ubuntu?

Best Answer

LibreOffice Draw

This impressed me:

sudo apt-get install libreoffice
libreoffice my.pdf

Just open the PDF, edit, and export as PDF.

The editing tools appear in a toolbar at the bottom of the window (took me some time to find it...)

Relevant feature set I have found so far (Ubuntu 13.04, LibreOffice 4.0.2.2):

  • Remove pages Right click on the page on the left page list > Delete page
  • Change page order: Drag drop pages on the page list
  • Edit existing text fields (edit text, formatting and position). Just click twice with the select tool to enter edit mode.
  • Add new text fields. Choose the text tool at the bottom (T), select the desired text area, and write.
  • Edit non text fields objects like lines or bullets.
  • Create fillable PDF forms (Enable the Form* toolbars and be sure to select "Create a PDF Form")

I could not find an extremely convenient highlight method, but you could get away with editing text attributes like setting the colour red and boldface. I could not change the background colour tough.

If I missed good features, please edit and add them!

Here is a screenshot of me editing a PDF exported from this ODT: https://github.com/cirosantilli/media/blob/f3497274fffcb043b9751c903c9fe715a5b023ce/test.odt on 6.4.6.

enter image description here

Of course, as you can see in the screenshot above, PDFs don't have as much information as the original ODT, and e.g. I can only edit one visible line at a time of a paragraph, and the following paragraphs won't "wrap back" to the correct size, since PDFs simply aren't designed to be editable.

Note: I know that it fails for a few type of PDFs, it has already happened to me.

If that is the case for you, please open a minimal, super detailed and reproducible bug report on their bug tracker https://bugs.documentfoundation.org/ so that devs may solve it, and post the link as a comment. When it happened to me I was lazy/inexperienced and didn't do that :-)

Despite this, it was still the best open solution when I last checked, and it works most of the time.