ocrmypdf-rs
A Rust library that adds “layers” of text to images in PDFs, making scanned image PDFs searchable using ocrmypdf, which is a Python application and library.
Prerequisites
For everything to work correctly, you need to have it installed on your OS ocrmypdf.
Example
Debian or Ubuntu users can simply use the following:
sudo apt install ocrmypdf
For more information on how to install on different OS, see the installation documents.
Installation
Install ocrmypdf-rs with cargo;
[]
= "0.0.7"
Usage/Examples
Basic example ref.
use ;
new method
When instantiating the OcrMyPdf
structure it is possible to pass the following parameters:
args: Option<Vec<String>>
see about arguments in documentationinput_path: Option<String>
input pdf pathoutput_path: Option<String>
output pdf path
[!TIP] 💡 If the input_path or output_path fields are provided, there is no need to provide them at runtime.
use ;
[!NOTE] The
-l por
args to work requires the additional selected language to be installed, see how install;