Skip to Content

How to Edit PDF Document on Ubuntu

Editing PDF files on Ubuntu can be a challenging task, especially if you don’t have the right tools or knowledge. PDFs are widely used for sharing documents, but they are not easy to modify or annotate. Fortunately, there are some solutions that can help you edit PDFs on Ubuntu, whether you need to add text, images, comments, or signatures.

In this article, you will learn how to edit PDFs on Ubuntu using different methods, such as:

  • Using LibreOffice Draw, a free and open-source software that can import and export PDFs
  • Using PDFedit, a dedicated PDF editor that offers advanced features and a graphical user interface
  • Using pdftk, a command-line tool that can manipulate PDFs in various ways
  • Using online PDF editors, such as Adobe Acrobat or Smallpdf, that can edit PDFs in your browser

Using LibreOffice Draw to Edit PDF on Ubuntu

LibreOffice Draw is a vector graphics editor that is part of the LibreOffice suite, a free and open-source alternative to Microsoft Office. LibreOffice Draw can import and export PDF files, allowing you to edit them as you would edit any other document.

Using LibreOffice Draw to Edit PDF on Ubuntu

To use LibreOffice Draw to edit PDFs on Ubuntu, follow these steps:

  1. Install LibreOffice Draw if you don’t have it already. You can install it from the Ubuntu Software Center or by running the following command in the terminal:
    sudo apt install libreoffice-draw
  2. Open LibreOffice Draw and click on File > Open. Navigate to the PDF file that you want to edit and select it. Click on Open.
  3. LibreOffice Draw will open the PDF file as a document with multiple pages. You can edit each page as you wish, using the tools available in the toolbar and the sidebar. You can add text, images, shapes, annotations, and more.
  4. When you are done editing, click on File > Export As > Export as PDF. Choose a name and a location for the edited PDF file and click on Export. You can also adjust the PDF options, such as the compression level, the image quality, the security settings, and more.

Using PDFedit to Edit PDF on Ubuntu

PDFedit is a dedicated PDF editor that offers advanced features and a graphical user interface. PDFedit can edit the content and the structure of PDF files, as well as the metadata and the scripts. PDFedit is not available in the official Ubuntu repositories, but you can install it from a third-party PPA (Personal Package Archive). To use PDFedit to edit PDFs on Ubuntu, follow these steps:

  1. Add the PDFedit PPA to your system by running the following command in the terminal:
    sudo add-apt-repository ppa:jeromerobert/pdfedit
  2. Update your system and install PDFedit by running the following commands in the terminal:
    sudo apt update
    sudo apt install pdfedit
  3. Open PDFedit and click on File > Open. Navigate to the PDF file that you want to edit and select it. Click on Open.
  4. PDFedit will open the PDF file in a window with multiple tabs. You can edit the PDF file in different modes, such as:
    • The Graphic mode, which allows you to edit the PDF file as a document with pages, text, images, and annotations. You can use the tools in the toolbar and the menu to modify the content and the appearance of the PDF file.
    • The Text mode, which allows you to edit the PDF file as a plain text file with the PDF syntax. You can use the tools in the toolbar and the menu to edit the text, the fonts, the colors, and the layout of the PDF file.
    • The Object tree mode, which allows you to edit the PDF file as a tree of objects, such as pages, streams, dictionaries, and arrays. You can use the tools in the toolbar and the menu to edit the properties and the values of the objects, as well as to add, delete, or move them.
    • The Revision mode, which allows you to edit the PDF file as a list of revisions, each representing a change made to the PDF file. You can use the tools in the toolbar and the menu to view, compare, or revert the revisions, as well as to create new ones.
  5. When you are done editing, click on File > Save. Choose a name and a location for the edited PDF file and click on Save. You can also click on File > Save As to save the edited PDF file as a different file type, such as PS, EPS, SVG, or XML.

Using pdftk to Edit PDF on Ubuntu

pdftk is a command-line tool that can manipulate PDF files in various ways, such as merging, splitting, rotating, encrypting, decrypting, watermarking, and more. pdftk is available in the official Ubuntu repositories, and you can install it by running the following command in the terminal:

sudo apt install pdftk

To use pdftk to edit PDFs on Ubuntu, you need to use the terminal and enter the appropriate commands and options. The general syntax of pdftk is:

pdftk input_file(s) operation output_file

where input_file(s) are the PDF files that you want to edit, operation is the action that you want to perform, and output_file is the name and location of the edited PDF file. For example, to merge two PDF files into one, you can use the following command:

pdftk file1.pdf file2.pdf cat output merged.pdf

where file1.pdf and file2.pdf are the input files, cat is the operation that concatenates the files, and merged.pdf is the output file. To split a PDF file into individual pages, you can use the following command:

pdftk file.pdf burst output page_%d.pdf

where file.pdf is the input file, burst is the operation that splits the file, and page_%d.pdf is the output file, where %d is a placeholder for the page number. To rotate a PDF file by 90 degrees clockwise, you can use the following command:

pdftk file.pdf cat 1-endright output rotated.pdf

where file.pdf is the input file, cat 1-endright is the operation that rotates the pages from the first to the last by 90 degrees clockwise, and rotated.pdf is the output file. To add a watermark to a PDF file, you can use the following command:

pdftk file.pdf background watermark.pdf output watermarked.pdf

where file.pdf is the input file, background watermark.pdf is the operation that adds the watermark.pdf file as a background to each page, and watermarked.pdf is the output file. To encrypt a PDF file with a password, you can use the following command:

pdftk file.pdf output encrypted.pdf user_pw password

where file.pdf is the input file, output encrypted.pdf user_pw password is the operation that encrypts the file with the password as the user password, and encrypted.pdf is the output file. To decrypt a PDF file with a password, you can use the following command:

pdftk file.pdf input_pw password output decrypted.pdf

where file.pdf is the input file, input_pw password is the operation that decrypts the file with the password as the user password, and decrypted.pdf is the output file. pdftk has many more options and features that you can explore by reading the manual page or the online documentation.

Using Online PDF Editors to Edit PDF on Ubuntu

Online PDF editors are web-based services that can edit PDF files in your browser, without requiring you to install any software on your system. Online PDF editors can offer various features and functions, such as adding text, images, comments, signatures, forms, and more. Some online PDF editors are free, while others require a subscription or a payment. Some online PDF editors are:

  • Adobe Acrobat, a popular and powerful online PDF editor that can edit, convert, compress, merge, split, protect, and share PDF files. Adobe Acrobat offers a free trial, but you need to sign up for a subscription to access all the features.
  • Smallpdf, a simple and easy-to-use online PDF editor that can edit, convert, compress, merge, split, sign, and unlock PDF files. Smallpdf offers a free service, but you need to upgrade to a Pro account to access more features and remove the limitations.
  • PDFescape, a free and online PDF editor that can edit, annotate, fill, and sign PDF files. PDFescape also offers a desktop version and a browser extension for more convenience and functionality.

To use an online PDF editor to edit PDFs on Ubuntu, you need to have a web browser and an internet connection. The steps may vary depending on the service that you choose, but they usually involve:

  1. Visiting the website of the online PDF editor and clicking on the option to edit a PDF file.
  2. Uploading the PDF file that you want to edit from your computer or from a cloud storage service, such as Google Drive or Dropbox.
  3. Editing the PDF file using the tools and features available on the website. You can add text, images, shapes, annotations, signatures, and more.
  4. Downloading the edited PDF file to your computer or saving it to a cloud storage service. You can also share the edited PDF file with others via email or a link.

Conclusion

Editing PDF files on Ubuntu can be done using different methods, depending on your needs and preferences.