A PDF is one of the most viable solutions for companies that need to send mission-critical documents; this is especially true when documents must be viewed in the same formatting and layout in which they were created. Many small businesses cannot afford to purchase the full-blown Adobe Acrobat application, and although the open source Scribus does a great job of creating PDF documents, it cannot open a PDF file for editing.
The good news is the flagship open source office suite LibreOffice can open and edit PDF documents. Don’t expect to create interactive forms and the like in LibreOffice, but you can take a basic PDF document and make simple edits, thanks to LibreOffice’s built-in Draw feature. In Draw, your PDF documents temporarily become images that can be edited. When you’re finished, the document simply needs to be exported back into PDF format. This feature works the same on all platforms, which means you can edit PDF documents on Windows, Mac, and Linux in the same way.
The only challenge you might face in the PDF editing process is that it can take a while to get up to speed in LibreOffice Draw. Let’s open up a PDF document, make some changes, and export it back into PDF format. For this tutorial, I will assume you already have the latest LibreOffice release installed.
Step 1: Open the document for editing
In a very smart move, LibreOffice developers made it so PDF documents don’t have to be imported; all you have to do is fire up the LibreOffice suite and go to File | Open. Navigate to the PDF file in question and open.
Step 2: Make your edits
Remember, you are editing this document as if it were an image, so typical image editing tools will apply; however, with LibreOffice Draw you are dealing with a sort of drawing app/word processor hybrid. Let’s edit text in a PDF document to illustrate this point.
With your PDF document open, you can click on any piece of the document to see that every piece has become a live object (Figure A).
Once you see the box around the object, it is in editing mode. (Click the image to enlarge.)
Depending upon the type of object you are editing, different tools will appear. In Figure A we are editing text, so the text tools appear. If you need to edit an image object, the image editing tools will appear (Figure B).
I am editing one of the color boxes behind the text. (Click the image to enlarge.)
To add a new object to your PDF, click the tool associated with the object on the bottom toolbar. Say you want to add a new text box and associated title. Click the Rectangle tool and then draw the rectangle in the working area. Once the rectangle is drawn, you will need to adjust the color fill and line color settings to suit your needs (Figure C).
I am creating a new box to closely match the original layout. (Click the image to enlarge.)
Tip 1: Once you add an object such as a box, any time you double-click that object LibreOffice will assume you want to add text, so the default tool for that action will be the text tool. If you need to edit the properties of that object, single click the object and make sure the control handles appear around the object.
Tip 2: Like any good drawing application, LibreOffice Draw uses layers; this means you can layer objects to ensure no objects are buried. To manage the layering of an object, select the object and right-click it to bring up the context menu. From the context menu (Figure D), select Arrange and then how you need that particular object moved.
Bring To Front will cover up all objects below, so don’t bring a large object to the front and obscure all smaller objects. (Click the image to enlarge.)
Step 3: Save your PDF
You do have to export the document as a PDF. To do so, click the PDF icon in the toolbar, give the document a name, and click Save. Your edited PDF document is saved and ready to share with end users.
Subscribe to the Developer Insider Newsletter
From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays