ocrmypdf:tldr:1b83b
ocrmypdf: Set the metadata of the searchable PDF file.
$ ocrmypdf --title "${title}" --author "${author}" --subject "${subject}" --keywords "${keyword; key phrase; ---}" ${path-to-input_file} ${path-to-output-pdf}
try on your machine
This command uses the ocrmypdf tool to perform OCR (Optical Character Recognition) on a PDF file and add metadata such as title, author, subject, and keywords to the output PDF file.
Here's the breakdown of the command:
ocrmypdf
: The command to run the ocrmypdf tool.--title "${title}"
: Specifies the title metadata for the output PDF file. The value of thetitle
variable will be substituted here.--author "${author}"
: Specifies the author metadata for the output PDF file. The value of theauthor
variable will be substituted here.--subject "${subject}"
: Specifies the subject metadata for the output PDF file. The value of thesubject
variable will be substituted here.--keywords "${keyword; key phrase; ---}"
: Specifies the keywords metadata for the output PDF file. The value of thekeyword; key phrase; ---
variable will be substituted here. Multiple keywords can be separated by semicolons.${path-to-input_file}
: Specifies the path to the input PDF file on which OCR will be performed.${path-to-output-pdf}
: Specifies the path and filename for the output PDF file.
To use this command, you need to replace ${title}
, ${author}
, ${subject}
, ${keyword; key phrase; ---}
, ${path-to-input_file}
, and ${path-to-output-pdf}
with the appropriate values specific to your situation.
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.