How to edit PDF files using PDFedit In Linux

Edit Pdf Files Using Pdfedit

With the increasing use of PDF format, people tend to need a tool to edit their PDF files. PDFedit is one of the best tools to edit PDF files on a Linux system.

PDFedit is a really good tool to edit a PDF on a much deeper level, as it breaks down everything into bits of information which is easily understandable and customizable.

In this article, we will learn how to setup PDFedit on our system and understand how to use it by performing various operations with it.

Installing PDFedit on Linux

Firstly, we will start by downloading the required packages for PDFedit, for that we will run the following wget command:

wget http://mirrors.kernel.org/ubuntu/pool/main/l/lcms/liblcms1_1.19.dfsg-1ubuntu3_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libm/libmng/libmng1_1.0.10-3_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/q/qt-x11-free/libqt3-mt_3.3.8-b-8ubuntu3_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/pdfedit/pdfedit_0.4.5-2_amd64.deb

Once all the commands finish execution, you have all the downloaded packages you need to setup PDFedit.

Now, to install them, run the dpkg command to install the deb files:

sudo dpkg -i *.deb

Once all the packages finish installing, PDFedit is ready to be used.

Using PDFedit for viewing and modifying PDF files

We can use PDFedit to do all type of modifications to any PDF file. In this article, we will cover all the major operations like editing, deleting, extracting information from the pdf and saving the changes done.

Let’s begin by opening PDFedit, you can search for it in your Applications and hit Enter to run it.

The PDFedit home screen will look something like this –

PDFedit Homescreen
PDFedit Homescreen

Now, Let’s open a PDF file to play around with, to learn how to use this application.

Click on File from the Menu. A file chooser will open to ask you which file to open, browse using its file structure and choose your desired file to edit.

File Chooser
File Chooser

Now, to be able to select objects and elements of the pdf file, Click on the Select icon from Menu Bar, as highlighted in the image and click on any object/element in the pdf file.

You can also browse through the pages, by using the arrows keys beside the page number in the Menu Bar.

Selecting An Element In PDF
Selecting An Element In PDF

Now, as you have learnt how to select elements/objects of the pdf file in PDFedit, let’s start with editing it.

1. Editing content of a pdf file

When you will select an element, the tree pane will open to the right of the opened file. Now spread the root tree by clicking on the + icon and it will show an option to edit the Parameter which looksf something like this –

Editing The Element
Editing The Element

Now, look at the bottom right. It will display the content held by the object/element you have selected, edit it to change the content in the pdf file. Like I changed “a” to “any”, as seen below-

Edited Element
Edited Element

In case, the changes are not visible. Click on Page in the Menu, and click Reload Page.

Now, you will be able to see the changes you made.

Reload Page Option
Reload Page

You can also right-click on the Parameter option in the tree at the pane in right, and choose to Add Object to add a new object to the selected element with its datatype and location you desire.

Adding Object
Adding Object

You can also move the selected element and drag & drop it anywhere on the opened page of the pdf file.

Moving The Element
Moving The Element

You can also delete the selected element by hitting the Delete key while it is selected and it will wipe it from the page.

Deleting The Element
Deleting The Element

2. Removing pages from a pdf file

For removing a page, focus on the tree pane on the right of the screen. Spread the Pages section by clicking on the + icon beside it. Now, right-click on any page number and a drop-down will open. Click Remove Page, and the page will be deleted.

Deleting A Page
Deleting A Page

3. Extracting text from a pdf file

For extracting text from a certain page, right-click on the page number from the Pages section of the Tree pane at the right of the screen.

Extract Text Option
Extract Text

A drop-down will open. Now, choose Extract Text from Page, and a small window will pop up containing all the textual data extracted from the particular page.

You can copy it and use it anywhere.

Extracting Text From Page
Extracting Text From a Page

4. Saving changes done to the pdf file

For saving the changes that you have done so far, right-click on File from the Menu, and a drop-down with various Save options will popup.

You can either write changes to the existing file, by clicking on Save or write changes to a new file by choosing Save New Revision.

Save Options
Save

Bonus

Conclusion

In this article, we learnt how to set up and use PDFedit for performing various changes to a PDF file, like modifying the content, deleting the content, removing pages, extracting textual data from the pdf file, and also saving the modifications to it.