Christmas Sale: Up to 43% Off with Free Gifts Get Deals Now

How to Convert PDF to Text on Linux? (3 Methods)

Have you ever come across a PDF document on Linux from which you just need the text? It could be a research paper or an important report.

In this guide, we will walk you through 3 ways to convert PDF to text on Linux into editable files. We'll cover using the command line method, an online tool, and OCRmyPDF.

If you are using Windows and Mac and want to convert PDF to text, you can use UPDF, a powerful PDF editor, can help with the task.  UPDF is an all-in-one, feature-rich PDF editor that allows you to easily convert PDFs to text, edit, annotate, and manage them. So, download it now if you have a Windows or Mac to deal with PDF tasks.

Windows • macOS • iOS • Android 100% secure

By the end of this article, you'll be a pro at extracting text from your PDFs!

How to Convert PDF to Text on Linux with Command Line?

The first method on our list to convert Linux PDF to Text is via the Command Line method. It is a powerful and efficient way to convert PDFs to text on Linux, especially if you need to handle multiple files or prefer automation.

This method is ideal for:

Here are the steps for it:

Step 1: The first step is to install the “poppler-utils” package. Open your terminal and type the following command according to your system:

For Debian, Ubuntu, Mint

sudo apt install poppler-utils

install poppler-utils package for Debian

For Fedora, CentOS

sudo dnf install poppler-utils

install poppler-utils package for fedora

Step 2: Navigate to the directory containing your PDF using the cd command. For example, if your PDF is in the Documents folder, type:

cd Documents

navigate to the directory containing pdf on linux

Step 3: Now convert PDF to text Linux using the following command:

“pdftotext source.pdf output.txt”

In this command, replace “source” with the name of the PDF file, and in the “output,” you can write the desired output file name.

enter prompt in terminal to convert pdf to text on linux

This will extract all the text content from your PDF and save it in the specified text file.

How to Convert PDF to text on Linux without Command Line

While the command line is a great way to convert PDF to text on linux, if you're looking for a more user-friendly option, you can use an online tool. This method is perfect for:

  • Users who are not aware of the command line prompts
  • Those new to Linux or terminal

For this method, we will avail the services of a free online PDF converter, FreePDFConverter.

Here’s how it works:

Step 1 Go to FreePDFConverter and click on “Choose File.”

click on choose file  in pdfconverter

Step 2: Click on the desired option from the available ones. In this case, we will select “To Word” as we’re looking for PDF to text Linux conversion.

select to word on freepdfconverter

Step 3: FreePDFConverter will convert PDF to text in just a few seconds. After that, you can click “Download” to save the file to your PC.

click on download after conversion to save text file

That’s how you can easily convert PDF to text on Linux via a free online tool.

How to Convert Image Only PDF or Scanned PDF to Text on Linux with OCRMYPDF

Regular pdftotext might struggle with image-based PDFs or scans where the text isn't embedded as searchable text data. In these cases, we can use a powerful tool called OCRmyPDF. It comes in handy for Linux OCR PDF image to text conversion.

Here’s how OCRmyPDF works for converting Linux OCR PDF to text:

Step 1: Open your terminal and type the following command according to your Linux system to install OCRmyPDF:

For Debian, Ubuntu, Mint

“sudo apt install ocrmypdf

install ocrmypdf using prompt on terminal

For Fedora, CentOS

“sudo dnf install ocrmypdf”

install ocrmypdf

Step 2: Once OCRmyPDF is successfully installed, it’s time to get converting! If you want to convert a single Linux OCR PDF image to text, enter the following prompt:

“ocrmypdf input.pdf output.pdf”

On the other hand, if you want to convert multiple PDFs to text in a folder, you can use the following prompt:

“for f in ./*.pdf; do ocrmypdf "$f" "$(basename "$f" ".pdf")_ocr.pdf"; done”

convert multiple files text with ocrmypdf

The output.pdf file should now contain searchable text layers that we can easily copy and paste.

Bonus Tip: How to Convert PDF to Text on Windows and Mac?

In the previous section, we discussed 3 different ways on how to convert PDF to text Linux; however, if you’re looking for a tool that does the same for Windows and Macs, we recommend giving UPDF a try.

Why Choose UPDF?

UPDF stands out from other PDF converters in both its free and paid versions, offering superior features and value. Some features include:

  • Free Version

You can convert 2 PDFs to text each day for free, which is a good limit compared to many other free converters.

  • Paid Version

Upgrading to the paid plan unlocks the batch PDF to text conversion feature, which allows you to convert multiple files at once. Additionally, thanks to its built-in OCR technology, you can easily convert OCR PDF images to text.

  • Beyond Conversion

UPDF isn't just a converter; it's a full-fledged PDF editor! You can edit text and images within your PDFs, annotate documents, and even use innovative features like chatting with colleagues directly on PDFs.

Ready to take control of your PDFs? Download UPDF today!

Windows • macOS • iOS • Android 100% secure

How to Convert PDF to Text Using UPDF?

In this section, we will take you through the steps of converting:

  • One PDF to text
  • Scanned PDF to text
  • Batch PDF files to text

Convert One PDF to Text

Here are the steps of converting one PDF to text using UPDF:

Step 1:  Launch UPDF and open the PDF you want to convert to text.

Step 2: From the right side menu, click on “Export PDF.”

Step 3: A menu with different format options will appear. Click “Word” or “Text” to convert your PDF to text.

select word or text format from the list in UPDF

Step 4: The next step is to adjust your document's settings, including the page range and language.

Step 4: Lastly, click on “Export” to save the converted PDF to your PC in the desired folder.

And that’s how simple it is to convert a single PDF to text using UPDF on Windows or Mac.

Convert Scanned PDF to Text

If you want to convert a scanned PDF to text with UPDF, you’ll need to use the OCR feature. Here are the steps for it:

Step 1: Launch UPDF and open the scanned PDF.

Step 2: From the menu on the right, select the “Recognize Text Using OCR” option.

click ocr from the right-side menu with UPDF

Step 3: Select the “Searchable PDF” option from the Document Type, adjust the settings, including the layout and language, etc., and click “Perform OCR.”

adjust settings and click Perform OCR

Step 4: Once the OCR process is done, go to “Export > Word/Text” and click “Export” to save the file to the desired folder on your PC.

Convert Batch PDF Files to Text

If you have multiple PDFs that you want to convert to text but don’t have the time to convert them individually, you can use the “Batch” option on UPDF.

Let’s look at the steps on how to batch-convert PDFs:

Step 1: Launch UPDF and select the “Batch” option next to “Open File.”

Step 2: Next, click on “Convert.”

Step 3: Set “Word” or “Text” as the output format, click on the“Retain Page Layout” option, and click on “Add Files” to add multiple PDFs to convert to text.

set output format and layout settings in UPDF

Step 4: Click on “Apply” to convert batch PDFs to text on Windows or Mac.

If you want to know more about UPDF, you can watch the below video.

Final Words

If you have a PDF that cannot be edited without a tool, you can convert the PDF to text on Linux in several different ways, including using the command line, online tools, and OCRmyPDF. And if you want to convert a PDF to text on your Windows PC or Mac, UPDF is here to help!

In this guide, we have discussed all these methods, including the steps and images.

So, download UPDF now and unleash the power of your PDFs!

Windows • macOS • iOS • Android 100% secure

% OFF
$  
  OFF
You can use this limited time coupon to purchase designated UPDF PRO or AI products.

Get limited
time coupons!

Click to receive and use it
Extra {couponPrice}% off coupon Extra ${couponPrice} coupon

We use cookies to ensure you get the best experience on our website. Continued use of this website indicates your acceptance of our privacy policy.