OCRmyPDF-DotNet
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package OCRmyPDF-DotNet --version 1.0.4
NuGet\Install-Package OCRmyPDF-DotNet -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OCRmyPDF-DotNet" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OCRmyPDF-DotNet --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OCRmyPDF-DotNet, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OCRmyPDF-DotNet as a Cake Addin #addin nuget:?package=OCRmyPDF-DotNet&version=1.0.4 // Install OCRmyPDF-DotNet as a Cake Tool #tool nuget:?package=OCRmyPDF-DotNet&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OCRmyPDF-DotNet
Este é um pequeno wrapper, feito em .NET 8/C#, para o projeto OCRmyPDF.
Instalação
Após a instalação é necessário fazer a configuração do Embedded.
Configuração no Projeto
Procure a pasta Embedded
, clique com o botão direito no exe
e clique em propriedades.
No "Copiar para Diretório de Saída", selecione o "Copiar se for mais novo", conforme imagem abaixo:
Uso/Exemplos
O método principal, StartProcess
, espera quatro argumentos:
StartProcess(string inputFilePath, string outputFilePath, string language = "eng", bool redoOCR = false)
- inputFilePath (String - Arquivo que será processado)
- outputFilePath (String - Arquivo final, após processamento)
- language (String - Linguagem do arquivo, caso não seja inglês, é importante enviar)
- redoOCR (Booleano - Caso o arquivo encontre erro ao processar o arquivo, envie como
true
e a aplicação irá reprocessa-lo)
Aqui, abaixo, uma chamada exemplo:
using OCRMyPDF;
namespace TestApplication
{
internal class Program
{
static void Main(string[] args)
{
var response = new OCR().StartProcess("arquivo.pdf", "arquivo-processado.pdf", "eng", true);
if (response.Success == false)
{
Console.WriteLine("erro!");
Console.WriteLine(response.Error);
}
else
{
Console.WriteLine("sucesso!");
}
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.