Forrest logo
back to the ocrmypdf tool

ocrmypdf:tldr:e803a

ocrmypdf: Create a new searchable PDF/A file from a scanned PDF or image file.
$ ocrmypdf ${path-to-input_file} ${path-to-output-pdf}
try on your machine

The command ocrmypdf ${path-to-input_file} ${path-to-output-pdf} is used to perform OCR (Optical Character Recognition) on a PDF file and create a new PDF file with searchable text.

Here is what each component of the command means:

  • ocrmypdf: This is the name of the command or program that performs OCR on the PDF file.
  • ${path-to-input_file}: This is the path or location of the input PDF file that you want to perform OCR on. You need to replace ${path-to-input_file} with the actual path to your input file.
  • ${path-to-output-pdf}: This is the path or location where you want to save the output PDF file with the OCR text. You need to replace ${path-to-output-pdf} with the actual desired location for your output file.

For example, if you have a PDF file named "document.pdf" located in the "/home/user/documents" directory, and you want to save the output PDF file as "document_with_ocr.pdf" in the same directory, the command will be:

ocrmypdf /home/user/documents/document.pdf /home/user/documents/document_with_ocr.pdf

Make sure you have installed the ocrmypdf software or package before running this command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ocrmypdf tool