267

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?

1
  • 1
    Care to add your answer to here: askubuntu.com/questions/72920/… and flag this for closure as a dupe of the first? You can also edit the title and the question a tiny bit on the other side. That will make things more consistence and make sure that the information is located on one place. Jul 10, 2012 at 15:57

16 Answers 16

264

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. See also: How can I extract a page range / a part of a PDF?
  • 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.

20
  • 3
    For "scenario A", LibreOffice pdf-importer (you might have to install it separately if have the Ubuntu pre-installed or the PPA), and for "scenario B" pdftk is the simplest (yet very powerful). Alternatively, for "scenario A" Inkscape in some cases.
    – carnendil
    Apr 29, 2013 at 17:44
  • 5
    If you are not installing the Community-provided LibreOffice (i.e., from libreoffice.org), you must do sudo apt-get install libreoffice-pdfimport.
    – carnendil
    Apr 29, 2013 at 21:53
  • 15
    Doesn't work for me; messes up the whole PDF, seemingly because it doesn't use the font info. Nov 24, 2014 at 12:20
  • 9
    Doesn't deal well with fonts at all.
    – Raphael
    May 23, 2016 at 13:33
  • 3
    Impressive! Perfect to quickly fill in PDF registration forms. Sep 1, 2016 at 13:39
117

LibreOffice Draw does not work for me as the fonts get completely messed up which then throws the formatting of the document off.

Here are three solutions that for me have worked consistently over the years.

PDF-shuffler

I do a lot of combining of PDF documents (as in the Scenario B) and I find PDF-shuffler simple and convenient. I have also used it to extract pages out of a larger pdf document and it works well there too. The PDF-shuffler GUI is simple and it works consistently.

Edit: PDF-shuffler is unmaintained and has been replaced by its fork PDF-arranger:

sudo apt install pdfarranger

Gimp

Sometimes for Scenario A you just want to convert the PDF into an image and then manipulate the image. If you don't know the difference between a vector graphic and an image, you probably want to convert to an image and GIMP does a good job of that. When you open a PDF with GIMP it will give you some choices about how you want to convert it. Pay attention to the resolution option. Choose a higher number for a larger file size and a more detailed image.

Inkscape

The truth is, there isn't a super easy way to edit PDF files following scenario A above. That is because PDF is a universal format and some of the structure of the document is lost when it is converted to PDF. A simple example: if you take a 3 page report and convert it to a PDF you have broken the links between the text on each page. If you edit the PDF version of it and delete a paragraph on the first page the text from pages 2 and 3 won't automatically flow onto the first page. It would be much easier to edit that document in the original program used to create it.

But for whatever reason, you don't have the original document so you are stuck working off of a PDF. So set your expectations appropriately when editing a PDF document following scenario A.

Once you set your expectations accordingly, you'll see that inkscape is the best tool for most jobs here. It will allow you to import a single page of the PDF document as an inkscape vector graphic. There will be a few things grouped together that don't really make sense, and you may have to change some fonts (assuming you don't have the original fonts installed), but really it is slick.

There is a learning curve to Inkscape but the truth is that you can't manipulate PDF without using some program with a learning curve. For my time, I'd prefer to invest that in learning Inkscape--a great application for creating vector graphics that can come in handy for lots of different scenarios--than I would in trying to figure out how to use a special tool just for editing PDFs.

Good luck

7
  • PDF Studio for Linux?
    – Déjà vu
    May 23, 2016 at 9:57
  • 2
    @ringø PDF Studio is not free.
    – anderstood
    Jun 14, 2016 at 19:20
  • 1
    If you can provide a minimal PDF for which LIbreOffice fails, let's find / open a bug for it and link to it. I've had some problem in the past I think too with some documents. Jan 9, 2017 at 10:57
  • there is hardly a learning curve to wysiwyg foxit. Aug 21, 2017 at 5:46
  • 1
    Pdf Shuffler is not maintained any more, however its fork Pdf Arranger is maintained and available in recent versions of Ubuntu: github.com/pdfarranger/pdfarranger
    – Étienne
    Sep 25, 2022 at 13:17
65

I'm a little late in the game here, but recently stumbled across this question while googling it for myself. For what it's worth, I would like to recommend Xournal for the first scenario.

It should be in the software center, or you can simply run the following from a terminal:

sudo apt-get install xournal

Besides that, I'm going to second everyone else's recommendation for pdfshuffler and pdftk for the second scenario.

Hope this helps!

7
  • 5
    excellent, free PDF annotation software and if you have a touch screen you can even sign off your docs just like on paper!!!
    – champost
    Dec 16, 2014 at 21:53
  • 3
    IIRC, Xournal rasterizes everything when saving/exporting. Not always what you want.
    – Raphael
    May 23, 2016 at 13:23
  • 6
    The default pdf export significantly lowered quality (and file size). I found that by enabling Options > Legacy PDF Export before exporting, the quality is nearly identical to the original.
    – Johann
    Jul 25, 2016 at 16:37
  • @Raphael it still preserves text and the file size was pretty similar, I don't think it rasterizes that much to be fair May 11, 2020 at 3:39
  • 1
    I confirm that the current version (4/2021) doesn't rasterize its content, and works smoothly over Debian 11. Apr 27, 2021 at 20:29
65

You can use the latest version of Master PDF Editor, which lets you edit all elements on the page.

Hint: Try the newest version first. But, as the last version 1.9.24 that I tried, had a bug that wouldnt open all images of a pdf file, the version 1.9.00 worked very fine, but the only way to get it is a direct link:
http://code-industry.net/public/MasterPDFEditor-1.9.00.x86_64.tar.gz
http://code-industry.net/public/MasterPDFEditor-1.9.00.i386.tar.gz

As mentioned in the comments, Master PDF Editor version 4, which was the last free version that did not put a watermark in the PDF, is taken down from its website, but is available at http://code-industry.net/public/master-pdf-editor-4.3.89_qt5.amd64.deb

12
  • 2
    Did I miss off something? The website reads: "The Linux-based version is free for non-commercial use." Mar 31, 2015 at 2:38
  • 4
    This is a full-featured professional application that can edit forms and save them (even in the free version). The free version locks some advanced features, but isn't crippled. Worth the price if you need the advanced features.
    – DavidJ
    Oct 13, 2016 at 14:35
  • 3
    Should be the accepted answer. The program is professional complete and workable. It handled my task with no problem.
    – Bryce
    Aug 25, 2017 at 22:37
  • 16
    Master PDF Editor (v5) inserts a watermark ("Created in Master PDF Editor") in the free version, which makes it useless. You need to buy the full version (~USD70 + taxes) to avoid the watermark.
    – Jaydin
    Jul 24, 2018 at 22:16
  • 5
    @JayDin Bought the full version of Master PDF Editor after comparing with other tools. This program is really professional and deserves to be purchased (imo).
    – Déjà vu
    Feb 6, 2019 at 13:38
16

I think that PDF-Shuffler is small but quite good app.

Info: PDF-Shuffler is a small python-gtk application, which helps the user to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface. It is a frontend for python-pyPdf.

PDF-Shuffler Web Site

3
  • Agreed Vladimir. In fact I should probably revise my answer as well. I have actually started using PDF-Shuffler instead of pdftk for lots of simple stuff like merging two pdf files.
    – snowguy
    Jan 11, 2013 at 16:19
  • 1
    I was glad to verify that pdfshuffler is available on Ubuntu 12.04 and helped me to rearrange the pages on a horrible PDF I got by email with some pages upside down. Excellent! Mar 19, 2013 at 19:38
  • Great tool. Worked perfectly for my need
    – Rags
    Aug 5, 2015 at 17:28
10

PDF-Shuffler, which was mentioned here, is very old and has some issues since it wasn't updated in a very long time (since 2012). To fix those issues and add new functionality, a fork was created, called PDF Arranger.

PDF Arranger

PDF Arranger is a free and open source application for manipulating PDF documents, that can be used to merge, split, rotate and crop PDF documents and reorder their pages, using an interactive user interface.

PDF Arranger is available in Ubuntu 19.04 and newer, and can be installed using:

sudo apt install pdfarranger

For older Ubuntu versions there's a PPA to install it (provided by Linux Uprising):

sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
sudo apt install pdfarranger
3
  • 4
    You can not edit the pdf as the topicstarter wants to. Jun 13, 2019 at 1:37
  • 4
    From the original question: "Scenario B. Combine PDFs or extract page(s) from a PDF". PDF Arranger does that.
    – Logix
    Jun 13, 2019 at 7:53
  • 1
    It is an amazing small app which does exactly what it is meant to, and works with Ubuntu and Debian very well. Apr 27, 2021 at 20:31
8

Foxit PDF Editor (non-free) works well via WINE.

Newer versions of Foxit might work as well -- haven't tested 'em, though.

~.~.~

ps: This answer applies to your "Scenario A": you can basically edit everything in a pdf with Foxit: i.e., you can not only add things, but actually edit them as if it were, say, a Word file.

4
  • 1
    In your opinion does it work better than inkscape which is free and doesn't require WINE?
    – snowguy
    Mar 8, 2013 at 16:44
  • Thanks for asking! The truth is, I've never worked with Inkscape yet (as I thought it's mainly a vector-graphics-thing for professional or ambitious hobby designers). I'll give it a go for editing PDF's and will report back soon on how it compares to Foxit. Mar 9, 2013 at 7:50
  • had a quick test-ride in Inkscape; looks pretty solid, with the major (?) complaint/caveat/bug that multiple-page support seems only possible with an extension, which has a 90 % upvote on sourceforge.net, so I guess it's sturdy. Would need to check that, too, for a fair comparison. Will report back. Mar 9, 2013 at 15:37
  • see also Mar 9, 2013 at 15:45
6

There was magic thing called pdfedit in repository. Anyway, you can get it from here http://sourceforge.net/projects/pdfedit/. I've used it to make some text changes directly to file, omitting any conversions, so that file structure remains untouched. Just choose text selection mode at toolbox and click the text you want to edit. You are allowed to do it through the text-box that appeares at upper-left corner of window. Of course, there are a lot more features.

1
  • 1
    Looks like the project has been abandoned - last updated in 2014-05-26.
    – Jaydin
    Jul 24, 2018 at 22:18
6

PDF Buddy is an online PDF editor that's a great solution for quick and easy cross-platform PDF editing, whether you're on Ubuntu or anything else. (It would come in handy for what you describe in Scenario A)

(Disclosure: I'm a co-founder of PDF Buddy)

5
  • i just tried BDF Buddy and it seems to be great for simple manipulation of PDF similar to scenario 1 or for signing PDF documents. Unlike inkscape you don't get any access to the PDF elements. But most of the time that's probably more trouble than it's worth. The "white out" feature pdf buddy has is usually sufficient for removing things.
    – snowguy
    Nov 30, 2013 at 1:24
  • The thing I didn't like was that you have to create an account (which I didn't do). I expected as much though from a freemium model which allows you to edit 3 documents for free a month. This is a great and easy solution for annotating an existing PDF or adding a signature.
    – snowguy
    Nov 30, 2013 at 1:27
  • 1
    Unfortunately you cannot use PDF Buddy to combine more than one PDF file.
    – snowguy
    Nov 30, 2013 at 1:27
  • 1
    Tested on one document, and it is great editor. Then spend an hour edit the real document, and realized it is not free :(
    – user200340
    Jul 5, 2016 at 8:31
  • Found my way here via Google...as far as I can tell, PDFBuddy is primarily for annotating; it doesn't appear to allow actual editing (e.g of existing text content).
    – larsks
    Jun 30, 2023 at 2:13
4

I am surprised that PDF Studio is not mentioned here.

It's an all-in-one PDF solution that can annotate, markup text, form fill, edit content, sign, OCR and manipulate PDF documents.

http://www.qoppa.com/pdfstudio

3
  • 4
    ...which is not free software, but I'm sure works just fine.
    – carnendil
    Mar 7, 2013 at 16:54
  • 1
    ...of all the non-free pdf editors I've come across, Foxit is still the benchmark for me... though I guess Nitro also deserves a mention... Mar 7, 2013 at 18:40
  • PDF Studio Viewer is a free and can be used to annotate PDFs.
    – Jaydin
    Jul 24, 2018 at 22:23
3

Scenario A

After what seemed like an eternal quest to find a good solution for annotations, I found the superior alternative to be PDF-XChange Editor via wine. Everything I have tested so far works, just make sure you install it via the 32-bit .msi installer wine msiexec /i path/to/msi_file. Annotations are saved with the document and not separate (as in okular by default) and you can even edit document text with the free version (images with the paid one). Their forums are also linux friendly and they seem to try to keep it wine compatible. Running through wine is buttersmooth for me, but If you want a native app, I think master-pdf-editor is the most promising alternative.

Scenario B

Two command line tools that are shipped with Ubuntu by default, pdfseparate and pdfunite is a fast and simple solution to split and merge pdf pages. If you want a GUI I recommend pdf-sam

1
  • Installer problems doesn't seem to be reported anymore since late 1.7 wine versions. The other tools you mention instead are part of poppler-utils for the records.
    – mirh
    Mar 28, 2019 at 21:02
1

Ubuntu 20.04 how to edit PDF

I kindly suggest Foxit PDF Reader for Linux which is free and beloved, nice to see it is available for Linux too

Download, install

Double click on a PDF and when asked, optionally set Foxit as default PDF viewer or just select Foxit for this type on PDF test

When the PDF is opened

Enable the Comment bar (there is a button for this between View and Connect buttons)

The comment bar will appear, don't be tricked by those new buttons, and instead

click on the three dots menu

There you have the nice Typewrite option

and there you are

0

Considering a typical use case of editing a pdf document scanned using a scanner to delete some pages and to rotate pages libreoffice draw seems to be good enough. This is especially relevant if one is scanning a few pages of a bounded book.

To rotate a page by 180 degrees, right click on the document and press flip horizontally then right click again and press flip vertically.

Flipping once creates a mirror image and flipping twice rotates the page as desired.

0

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

I'm surprised that PDFsam ("split-and-merge") is not already noted in this Q&A. The "basic edition" is free and open source, and is also cross-platform. It can split, merge, mix, rotate, and extract.

I've used it for many years on each of Ubuntu (and other l*nux), MacOS, and Windows. Does what it says on the tin.

0

Scribus for editing PDFs. While clunky in usage, it does work, and to my experience is more faithful to the input PDF's layout than LibreOffice Writer.

# installation via apt package:
sudo apt install scribus

# installation via flatpak:
flatpak install flathub net.scribus.Scribus
-1

'PDF-Shuffler' along with 'LibreOffice'

You can download PDF-Shuffler from Ubuntu Software. With PDF-Shuffler you can Rotate, Crop, Delete or Export page/s. LibreOffice is already there as default.

Using these two Apps I could edit PDF in my Ubuntu 16.04LTS.

First, I opened the PDF file using PDF-Shuffler, right-clicked and exported the page that is to be edited (and named the new file). Then I opened that file using LibreOffice. Without doing anything I could edit that file. Then I saved the file. As a result I got an odg file. Just double-clicked the file to open it. LibreOffice (LibreOffice Draw) opened that file. I got the new PDF file just by clicking on the red button for converting into PDF.

This was very easy. No need to pay money for Editing PDF as in Windows.

You must log in to answer this question.

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