PDF files: read and edit PDFs on a Raspberry Pi
By Russell Barnes. Posted

Advertisement
The desktop computer you've been waiting for: Raspberry Pi 500+
PDF documents have all kinds of uses, from receipts and invoices from online shops, to newsletters and magazines – including The MagPi.
Whether you’re reading this article in print or as an electronic document, the pages you are reading began as PDF files, which are either sent to a printer or uploaded to the web.
There’s a reason for this. PDFs are excellent at preserving complex layouts of text and graphics, meaning that the recipient sees exactly what you intended them to see, regardless of the device and software used.
As well as guaranteeing quality and consistency when distributing documents, the PDF is an excellent tool for archiving documents and information. Rather than printing a receipt from a website or a document you’ve created, save it as a PDF (often called ‘printing to file’). This lets you keep a record that doesn’t take up any space, and which you can find easily without rifling through a filing cabinet or a stack of paper.
While we often think of PDF as a read-only file type – something that we can only look at – modern PDF software allows us to edit almost any PDF. For example, if a school emails a PDF letter asking for contact details, you can type those details into the PDF, save it, and email the completed form back. No more printing forms and hoping your child remembers to hand them to the teacher.
The good news is that you can complete all these tasks using a Raspberry Pi. This includes using the PDF viewer built into Raspbian to open, save, and print documents – but we’ll also show you how to install a more advanced PDF viewer to edit your PDF files.
>STEP-01: Saving PDF files
Whether you’re viewing a PDF from an email, a download, or a USB drive, save it to your Pi as you would any other file. To read The MagPi on your Raspberry Pi click here to download The MagPi issue 63. By default, the PDF file will open inside the Chromium web browser. Right-click and choose Save As and Save.
>STEP-02: Opening a PDF file
Double-click on the PDF file (located in the Downloads folder) and you will be asked which application you would like to use to open it. Open Accessories and choose PDF Viewer, and tick the Set selected application as default action for this file type box at the bottom to set PDF Viewer as your default PDF program. Click OK.
>STEP-03: Adjusting the view
To resize your PDF to fit the window, open the zoom menu (click the downwards arrow next to the size box at the bottom of the window). Choose a size, or use ‘fit width’ if you want the PDF page to be the same width as the window.
>STEP-04: Searching a PDF
You can search a PDF for specific words by clicking the binoculars button at the bottom of the window. Use ‘Match case’ or ‘Whole words only’ to narrow your search.
>STEP-05: Printing a PDF
To print your PDF, click the printer button at the bottom of the window. You can print the whole document, or a range using the Pages boxes.
>STEP-06: Installing Okular
If you want to edit a PDF, you’ll need to install Okular. Go to Menu > Preferences > Add/Remove Programs. Search for Okular, tick the box, and click OK. To open a PDF in Okular, right-click on the file and select Okular.
>STEP-07: Editing a PDF
Open the Tools menu in Okular and click Review to show the editing tools sidebar. To highlight or underline text, select the text with the cursor (as in a word processor), and click the relevant tool button. You can also add notes and shapes to the document.

Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles

Raspberry Pi 500+ in Raspberry Pi Official Magazine issue 158
We’re quite taken with Raspberry Pi 500+. But when you don’t need all that processing power, and just want a board that will make a plastic skeleton jump around in a terrifying manner, you’ll find Raspberry Pi Pico more than up to the job. There’s more terror in the magazine (which is only right as […]
Read more →

Win one of five Raspberry Pi SSD 1TB
Raspberry Pi prides itself on high quality hardware, and this 1TB Raspberry Pi SSD is no different. You can use it with a standard Raspberry Pi or even in your desktop PC – the choice is yours. We have five to give away and you can enter below Win 1 of 5 Raspberry Pi SSD […]
Read more →

Dual-screen cyberdeck
Twin screens mean you can code on one screen while watching David Bowie’s 1978 Musikladen show on the other.
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.