// PM> Install-Package IronOcr.Languages.Panjabiusing IronOcr;varOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput(@"images\Panjabi.png")){ varResult = Ocr.Read(Input); varAllText = Result.Text; // Print the entire text to the console.Console.WriteLine(AllText);}
// PM> Install-Package IronOcr.Languages.Panjabi
using IronOcr;
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput(@"images\Panjabi.png"))
{
var Result = Ocr.Read(Input);
var AllText = Result.Text;
// Print the entire text to the console.
Console.WriteLine(AllText);
}
' PM> Install-Package IronOcr.Languages.PanjabiImportsIronOcrPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput("images\Panjabi.png") DimResult = Ocr.Read(Input) DimAllText = Result.Text ' Print the entire text to the console.Console.WriteLine(AllText)EndUsing
' PM> Install-Package IronOcr.Languages.Panjabi
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput("images\Panjabi.png")
Dim Result = Ocr.Read(Input)
Dim AllText = Result.Text
' Print the entire text to the console.
Console.WriteLine(AllText)
End Using
// Simple single line OCR conversionstringText = new IronTesseract().Read(@"img\Screenshot.png").Text;
// Simple single line OCR conversion
string Text = new IronTesseract().Read(@"img\Screenshot.png").Text;
' Simple single line OCR conversionDimTextAsString = (New IronTesseract()).Read("img\Screenshot.png").Text
' Simple single line OCR conversion
Dim Text As String = (New IronTesseract()).Read("img\Screenshot.png").Text
ਹਲ ਵਰਲਡ
// PM> Install-Package IronOcr.Languages.Panjabiusing IronOcr;// Create a new instance of IronTesseractvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;// Create an OcrInput to process images for OCRusing (varInput = new OcrInput()){ // Add an image for OCR processingInput.AddImage("images/sample.jpeg"); //... You can add multiple images for batch processing varResult = Ocr.Read(Input); // Output the resulting text to the consoleConsole.WriteLine(Result.Text);}
// PM> Install-Package IronOcr.Languages.Panjabi
using IronOcr;
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
// Create an OcrInput to process images for OCR
using (var Input = new OcrInput())
{
// Add an image for OCR processing
Input.AddImage("images/sample.jpeg");
//... You can add multiple images for batch processing
var Result = Ocr.Read(Input);
// Output the resulting text to the console
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Create a new instance of IronTesseractDimOcrAs New IronTesseract()Ocr.Language = OcrLanguage.Panjabi' Create an OcrInput to process images for OCRUsingInputAs New OcrInput() ' Add an image for OCR processingInput.AddImage("images/sample.jpeg") '... You can add multiple images for batch processing DimResult = Ocr.Read(Input) ' Output the resulting text to the consoleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Create a new instance of IronTesseract
Dim Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
' Create an OcrInput to process images for OCR
Using Input As New OcrInput()
' Add an image for OCR processing
Input.AddImage("images/sample.jpeg")
'... You can add multiple images for batch processing
Dim Result = Ocr.Read(Input)
' Output the resulting text to the console
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;// Process PDF documents for OCRusing (varInput = new OcrInput()){Input.AddPdf("example.pdf", "password"); // Add PDF with optional password // Choose specific pages for OCR, if necessary varResult = Ocr.Read(Input); // Display the detected textConsole.WriteLine(Result.Text); // Print the number of pages processedConsole.WriteLine($"{Result.Pages.Count()} Pages"); // PDF ਮਹਿ ਹਰਕ ਪਨ ਲਈ 1 ਪਨਾ}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
// Process PDF documents for OCR
using (var Input = new OcrInput())
{
Input.AddPdf("example.pdf", "password"); // Add PDF with optional password
// Choose specific pages for OCR, if necessary
var Result = Ocr.Read(Input);
// Display the detected text
Console.WriteLine(Result.Text);
// Print the number of pages processed
Console.WriteLine($"{Result.Pages.Count()} Pages");
// PDF ਮਹਿ ਹਰਕ ਪਨ ਲਈ 1 ਪਨਾ
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Panjabi' Process PDF documents for OCRUsingInput = New OcrInput()Input.AddPdf("example.pdf", "password") ' Add PDF with optional password ' Choose specific pages for OCR, if necessary DimResult = Ocr.Read(Input) ' Display the detected textConsole.WriteLine(Result.Text) ' Print the number of pages processedConsole.WriteLine($"{Result.Pages.Count()} Pages") ' PDF ਮਹਿ ਹਰਕ ਪਨ ਲਈ 1 ਪਨਾEndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
' Process PDF documents for OCR
Using Input = New OcrInput()
Input.AddPdf("example.pdf", "password") ' Add PDF with optional password
' Choose specific pages for OCR, if necessary
Dim Result = Ocr.Read(Input)
' Display the detected text
Console.WriteLine(Result.Text)
' Print the number of pages processed
Console.WriteLine($"{Result.Pages.Count()} Pages")
' PDF ਮਹਿ ਹਰਕ ਪਨ ਲਈ 1 ਪਨਾ
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;// Process multi-frame TIFF images for OCRusing (varInput = new OcrInput()){Input.AddMultiFrameTiff("multi-frame.tiff"); // Add multi-page TIFF file varResult = Ocr.Read(Input); // Output the resulting text to the consoleConsole.WriteLine(Result.Text);}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
// Process multi-frame TIFF images for OCR
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("multi-frame.tiff"); // Add multi-page TIFF file
var Result = Ocr.Read(Input);
// Output the resulting text to the console
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.Panjabi' Process multi-frame TIFF images for OCRUsingInput = New OcrInput()Input.AddMultiFrameTiff("multi-frame.tiff") ' Add multi-page TIFF file DimResult = Ocr.Read(Input) ' Output the resulting text to the consoleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
' Process multi-frame TIFF images for OCR
Using Input = New OcrInput()
Input.AddMultiFrameTiff("multi-frame.tiff") ' Add multi-page TIFF file
Dim Result = Ocr.Read(Input)
' Output the resulting text to the console
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Configuration.ReadBarCodes = true; // Enable barcode readingusing (varInput = new OcrInput()){Input.AddImage("img/Barcode.png"); // Add image containing barcode varResult = Ocr.Read(Input); // Loop through detected barcodes foreach (varBarcodeinResult.Barcodes) {Console.WriteLine(Barcode.Value); // Print barcode values // Additional properties like type and location are also available }}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true; // Enable barcode reading
using (var Input = new OcrInput())
{
Input.AddImage("img/Barcode.png"); // Add image containing barcode
var Result = Ocr.Read(Input);
// Loop through detected barcodes
foreach (var Barcode in Result.Barcodes)
{
Console.WriteLine(Barcode.Value); // Print barcode values
// Additional properties like type and location are also available
}
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsDimOcrAs New IronTesseract()Ocr.Configuration.ReadBarCodes = True ' Enable barcode readingUsingInputAs New OcrInput()Input.AddImage("img/Barcode.png") ' Add image containing barcode DimResult = Ocr.Read(Input) ' Loop through detected barcodes For EachBarcodeInResult.BarcodesConsole.WriteLine(Barcode.Value) ' Print barcode values ' Additional properties like type and location are also available NextEndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Dim Ocr As New IronTesseract()
Ocr.Configuration.ReadBarCodes = True ' Enable barcode reading
Using Input As New OcrInput()
Input.AddImage("img/Barcode.png") ' Add image containing barcode
Dim Result = Ocr.Read(Input)
' Loop through detected barcodes
For Each Barcode In Result.Barcodes
Console.WriteLine(Barcode.Value) ' Print barcode values
' Additional properties like type and location are also available
Next
End Using
using IronOcr;using System.Drawing; // Required for Rectangle class// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput()){ // Define a specific area on the image to perform OCR varContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };Input.Add("document.png", ContentArea); // Add the cropped area for OCR varResult = Ocr.Read(Input); // Print the text detected within the specified rectangleConsole.WriteLine(Result.Text);}
using IronOcr;
using System.Drawing; // Required for Rectangle class
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput())
{
// Define a specific area on the image to perform OCR
var ContentArea = new Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
Input.Add("document.png", ContentArea); // Add the cropped area for OCR
var Result = Ocr.Read(Input);
// Print the text detected within the specified rectangle
Console.WriteLine(Result.Text);
}
ImportsIronOcrImportsSystem.Drawing' Required for Rectangle class' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput() ' Define a specific area on the image to perform OCR DimContentArea = New Rectangle() With { .X = 215, .Y = 1250, .Height = 280, .Width = 1335 }Input.Add("document.png", ContentArea) ' Add the cropped area for OCR DimResult = Ocr.Read(Input) ' Print the text detected within the specified rectangleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
Imports System.Drawing ' Required for Rectangle class
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput()
' Define a specific area on the image to perform OCR
Dim ContentArea = New Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
Input.Add("document.png", ContentArea) ' Add the cropped area for OCR
Dim Result = Ocr.Read(Input)
' Print the text detected within the specified rectangle
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput(@"img\Potter.LowQuality.tiff")){Input.DeNoise(); // Mitigate digital noise and low-quality scanningInput.Deskew(); // Correct rotation and tilts varResult = Ocr.Read(Input); // Output the resulting text to the consoleConsole.WriteLine(Result.Text);}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput(@"img\Potter.LowQuality.tiff"))
{
Input.DeNoise(); // Mitigate digital noise and low-quality scanning
Input.Deskew(); // Correct rotation and tilts
var Result = Ocr.Read(Input);
// Output the resulting text to the console
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput("img\Potter.LowQuality.tiff")Input.DeNoise() ' Mitigate digital noise and low-quality scanningInput.Deskew() ' Correct rotation and tilts DimResult = Ocr.Read(Input) ' Output the resulting text to the consoleConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput("img\Potter.LowQuality.tiff")
Input.DeNoise() ' Mitigate digital noise and low-quality scanning
Input.Deskew() ' Correct rotation and tilts
Dim Result = Ocr.Read(Input)
' Output the resulting text to the console
Console.WriteLine(Result.Text)
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput()){Input.Title = "Quarterly Report"; // Set a title for the resulting PDFInput.AddImage("image1.jpeg");Input.AddImage("image2.png");Input.AddImage("image3.gif"); varResult = Ocr.Read(Input); // Export the OCR results to a searchable PDFResult.SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput())
{
Input.Title = "Quarterly Report"; // Set a title for the resulting PDF
Input.AddImage("image1.jpeg");
Input.AddImage("image2.png");
Input.AddImage("image3.gif");
var Result = Ocr.Read(Input);
// Export the OCR results to a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput()Input.Title = "Quarterly Report" ' Set a title for the resulting PDFInput.AddImage("image1.jpeg")Input.AddImage("image2.png")Input.AddImage("image3.gif") DimResult = Ocr.Read(Input) ' Export the OCR results to a searchable PDFResult.SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput()
Input.Title = "Quarterly Report" ' Set a title for the resulting PDF
Input.AddImage("image1.jpeg")
Input.AddImage("image2.png")
Input.AddImage("image3.gif")
Dim Result = Ocr.Read(Input)
' Export the OCR results to a searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf")
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput()){Input.AddMultiFrameTiff("example.tiff"); // Add a multi-frame TIFF for conversion // Export the OCR results directly to a searchable PDF varResult = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf");}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput())
{
Input.AddMultiFrameTiff("example.tiff"); // Add a multi-frame TIFF for conversion
// Export the OCR results directly to a searchable PDF
var Result = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf");
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput()Input.AddMultiFrameTiff("example.tiff") ' Add a multi-frame TIFF for conversion ' Export the OCR results directly to a searchable PDF DimResult = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf")EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput()
Input.AddMultiFrameTiff("example.tiff") ' Add a multi-frame TIFF for conversion
' Export the OCR results directly to a searchable PDF
Dim Result = Ocr.Read(Input).SaveAsSearchablePdf("searchable.pdf")
End Using
HTML ਦ ਰਪ ਵਿਚ ਓਸੀਆਰ ਦ ਨਤੀਜ ਨਿਰਯਾਤ ਕਰ
ਓਸੀਆਰ ਚਿਤਰ ਨ ਐਕਸਐਚਟੀਐਮਐਲ ਰਪਾਤਰਣ ਵਿਚ.
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput()){Input.Title = "Html Title"; // Assign a title for the HTML outputInput.AddImage("image1.jpeg"); // Add image to process varResult = Ocr.Read(Input); // Export the OCR results to an HTML fileResult.SaveAsHocrFile("results.html");}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput())
{
Input.Title = "Html Title"; // Assign a title for the HTML output
Input.AddImage("image1.jpeg"); // Add image to process
var Result = Ocr.Read(Input);
// Export the OCR results to an HTML file
Result.SaveAsHocrFile("results.html");
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput()Input.Title = "Html Title" ' Assign a title for the HTML outputInput.AddImage("image1.jpeg") ' Add image to process DimResult = Ocr.Read(Input) ' Export the OCR results to an HTML fileResult.SaveAsHocrFile("results.html")EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput()
Input.Title = "Html Title" ' Assign a title for the HTML output
Input.AddImage("image1.jpeg") ' Add image to process
Dim Result = Ocr.Read(Input)
' Export the OCR results to an HTML file
Result.SaveAsHocrFile("results.html")
End Using
using IronOcr;// Initialize IronTesseract for OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;using (varInput = new OcrInput(@"LowQuality.jpeg")){Input.DeNoise(); // Reduce digital noise and improve image clarityInput.Deskew(); // Adjust skewed images for stronger OCR performance varResult = Ocr.Read(Input); // Display the OCR result textConsole.WriteLine(Result.Text);}
using IronOcr;
// Initialize IronTesseract for OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
using (var Input = new OcrInput(@"LowQuality.jpeg"))
{
Input.DeNoise(); // Reduce digital noise and improve image clarity
Input.Deskew(); // Adjust skewed images for stronger OCR performance
var Result = Ocr.Read(Input);
// Display the OCR result text
Console.WriteLine(Result.Text);
}
ImportsIronOcr' Initialize IronTesseract for OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiUsingInput = New OcrInput("LowQuality.jpeg")Input.DeNoise() ' Reduce digital noise and improve image clarityInput.Deskew() ' Adjust skewed images for stronger OCR performance DimResult = Ocr.Read(Input) ' Display the OCR result textConsole.WriteLine(Result.Text)EndUsing
Imports IronOcr
' Initialize IronTesseract for OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Using Input = New OcrInput("LowQuality.jpeg")
Input.DeNoise() ' Reduce digital noise and improve image clarity
Input.Deskew() ' Adjust skewed images for stronger OCR performance
Dim Result = Ocr.Read(Input)
' Display the OCR result text
Console.WriteLine(Result.Text)
End Using
OcrInput.Rotate(double degrees) - Rotates the image a specified number of degrees clockwise. Use negative numbers for counter-clockwise.
OcrInput.Binarize() - Converts every pixel to either black or white, removing all intermediate shades. Useful in cases of poor contrast between text and background.
OcrInput.ToGrayScale() - Converts each pixel to grayscale. May improve speed but not necessarily accuracy.
OcrInput.Contrast() - Automatically boosts contrast. Improves speed and accuracy for low contrast scans significantly.
OcrInput.DeNoise() - Removes digital noise, most useful where such issues are anticipated.
OcrInput.Invert() - Inverts all colors, useful where text is white on a black background.
OcrInput.Dilate() - Advanced morphological operation that adds pixels to the boundaries of objects to emphasize features. Opposite of erode.
OcrInput.Erode() - Removes pixels at object boundaries, contrasting dilation.
OcrInput.Deskew() - Rotates an image forward or backward to make it orthogonal, invaluable for skewed scans where Tesseract tolerance can be low.
OcrInput.DeepCleanBackgroundNoise() - Handles heavy background noise removal, appropriate for known high-noise circumstances but costly in CPU and could reduce clean document accuracy.
OcrInput.EnhanceResolution - Enhances resolution of low-density images autonomously. Not commonly needed as low resolution is managed automatically by OcrInput.MinimumDPI and OcrInput.TargetDPI settings.
CleanBackgroundNoise is time-consuming but invaluable for eliminating noise, crumples and deficiencies making OCR possible where otherwise not so.
EnhanceContrast automatically amplifies contrast against the background, boosting performance and reliability.
EnhanceResolution upgrades resolution below 275 DPI, sharpening down-sampled text to render OCRing feasible, reducing total duration over its singular time cost.
Language support across 22 international languages via integratable language packs.
Strategy allows opting between rapid low-fidelity scanning or detailed accuracy-enhancing scans modeling word relationships.
ColorSpace decides between grayscale or color, where sometimes full-color contrast provides superior results.
DetectWhiteTextOnDarkBackground designed for scanning dark pages correctly.
InputImageType specifies whether scanning a whole document or merely a screenshot snippet.
RotateAndStraighten is configured for reading documents that aren't just rotated but potentially perceptually warped.
ReadBarcode automatically scans PDF/pages for barcodes or QRs while processing text.
Color dictates bits per pixel defining color depth, impacting quality and processing times.
using IronOcr;// PM> Install-Package IronOcr.Languages.Arabic// Initialize IronTesseract for Arabic OCR operationsvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Arabic;using (varInput = new OcrInput()){Input.AddImage("img/arabic.gif"); // Add image with Arabic text // If needed, include image filter adjustments // Even low-quality inputs could be read by IronTesseract varResult = Ocr.Read(Input); // Console in Windows may not print Arabic correctly // Save the result to a file insteadResult.SaveAsTextFile("arabic.txt");}
using IronOcr;
// PM> Install-Package IronOcr.Languages.Arabic
// Initialize IronTesseract for Arabic OCR operations
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Arabic;
using (var Input = new OcrInput())
{
Input.AddImage("img/arabic.gif"); // Add image with Arabic text
// If needed, include image filter adjustments
// Even low-quality inputs could be read by IronTesseract
var Result = Ocr.Read(Input);
// Console in Windows may not print Arabic correctly
// Save the result to a file instead
Result.SaveAsTextFile("arabic.txt");
}
ImportsIronOcr' PM> Install-Package IronOcr.Languages.Arabic' Initialize IronTesseract for Arabic OCR operationsPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.ArabicUsingInput = New OcrInput()Input.AddImage("img/arabic.gif") ' Add image with Arabic text ' If needed, include image filter adjustments ' Even low-quality inputs could be read by IronTesseract DimResult = Ocr.Read(Input) ' Console in Windows may not print Arabic correctly ' Save the result to a file insteadResult.SaveAsTextFile("arabic.txt")EndUsing
Imports IronOcr
' PM> Install-Package IronOcr.Languages.Arabic
' Initialize IronTesseract for Arabic OCR operations
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Arabic
Using Input = New OcrInput()
Input.AddImage("img/arabic.gif") ' Add image with Arabic text
' If needed, include image filter adjustments
' Even low-quality inputs could be read by IronTesseract
Dim Result = Ocr.Read(Input)
' Console in Windows may not print Arabic correctly
' Save the result to a file instead
Result.SaveAsTextFile("arabic.txt")
End Using
using IronOcr;// PM> Install-Package IronOcr.Languages.ChineseSimplified// Set up IronTesseract for multi-language OCRvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.ChineseSimplified;Ocr.AddSecondaryLanguage(OcrLanguage.Panjabi); // Add additional languages// Multiple languages can be set if neededusing (varInput = new OcrInput()){Input.Add("multi-language.pdf"); // Add multi-language PDF for OCR varResult = Ocr.Read(Input); // Save the obtained text result to a fileResult.SaveAsTextFile("results.txt");}
using IronOcr;
// PM> Install-Package IronOcr.Languages.ChineseSimplified
// Set up IronTesseract for multi-language OCR
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.ChineseSimplified;
Ocr.AddSecondaryLanguage(OcrLanguage.Panjabi); // Add additional languages
// Multiple languages can be set if needed
using (var Input = new OcrInput())
{
Input.Add("multi-language.pdf"); // Add multi-language PDF for OCR
var Result = Ocr.Read(Input);
// Save the obtained text result to a file
Result.SaveAsTextFile("results.txt");
}
ImportsIronOcr' PM> Install-Package IronOcr.Languages.ChineseSimplified' Set up IronTesseract for multi-language OCRPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.ChineseSimplifiedOcr.AddSecondaryLanguage(OcrLanguage.Panjabi) ' Add additional languages' Multiple languages can be set if neededUsingInput = New OcrInput()Input.Add("multi-language.pdf") ' Add multi-language PDF for OCR DimResult = Ocr.Read(Input) ' Save the obtained text result to a fileResult.SaveAsTextFile("results.txt")EndUsing
Imports IronOcr
' PM> Install-Package IronOcr.Languages.ChineseSimplified
' Set up IronTesseract for multi-language OCR
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.ChineseSimplified
Ocr.AddSecondaryLanguage(OcrLanguage.Panjabi) ' Add additional languages
' Multiple languages can be set if needed
Using Input = New OcrInput()
Input.Add("multi-language.pdf") ' Add multi-language PDF for OCR
Dim Result = Ocr.Read(Input)
' Save the obtained text result to a file
Result.SaveAsTextFile("results.txt")
End Using
using IronOcr;using System.Drawing; // Necessary for advanced OCR options// Configure IronTesseract for advanced OCRvarOcr = new IronTesseract();Ocr.Language = OcrLanguage.Panjabi;Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;Ocr.Configuration.ReadBarCodes = true; // Important for barcode readingusing (varInput = new OcrInput(@"images\sample.tiff")){ OcrResultResult = Ocr.Read(Input); varPages = Result.Pages; // Access the page collection varWords = Pages[0].Words; // Access words of the first page varBarcodes = Result.Barcodes; // Access detected barcodes // Explore an extensive API to access: // - Pages, Blocks, Paragraphs, Lines, Words, Characters // - Image export, font coordinates, and statistical details}
using IronOcr;
using System.Drawing; // Necessary for advanced OCR options
// Configure IronTesseract for advanced OCR
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Panjabi;
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm;
Ocr.Configuration.ReadBarCodes = true; // Important for barcode reading
using (var Input = new OcrInput(@"images\sample.tiff"))
{
OcrResult Result = Ocr.Read(Input);
var Pages = Result.Pages; // Access the page collection
var Words = Pages[0].Words; // Access words of the first page
var Barcodes = Result.Barcodes; // Access detected barcodes
// Explore an extensive API to access:
// - Pages, Blocks, Paragraphs, Lines, Words, Characters
// - Image export, font coordinates, and statistical details
}
ImportsIronOcrImportsSystem.Drawing' Necessary for advanced OCR options' Configure IronTesseract for advanced OCRPrivateOcr = New IronTesseract()Ocr.Language = OcrLanguage.PanjabiOcr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstmOcr.Configuration.ReadBarCodes = True ' Important for barcode readingUsingInput = New OcrInput("images\sample.tiff") DimResultAsOcrResult = Ocr.Read(Input) DimPages = Result.Pages' Access the page collection DimWords = Pages(0).Words' Access words of the first page DimBarcodes = Result.Barcodes' Access detected barcodes ' Explore an extensive API to access: ' - Pages, Blocks, Paragraphs, Lines, Words, Characters ' - Image export, font coordinates, and statistical detailsEndUsing
Imports IronOcr
Imports System.Drawing ' Necessary for advanced OCR options
' Configure IronTesseract for advanced OCR
Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Panjabi
Ocr.Configuration.EngineMode = TesseractEngineMode.TesseractAndLstm
Ocr.Configuration.ReadBarCodes = True ' Important for barcode reading
Using Input = New OcrInput("images\sample.tiff")
Dim Result As OcrResult = Ocr.Read(Input)
Dim Pages = Result.Pages ' Access the page collection
Dim Words = Pages(0).Words ' Access words of the first page
Dim Barcodes = Result.Barcodes ' Access detected barcodes
' Explore an extensive API to access:
' - Pages, Blocks, Paragraphs, Lines, Words, Characters
' - Image export, font coordinates, and statistical details
End Using
Curtis Chau posiada tytuł licencjata z informatyki (Uniwersytet Carleton) i specjalizuje się w front-endowym rozwoju, z ekspertką w Node.js, TypeScript, JavaScript i React. Pasjonuje się tworzeniem intuicyjnych i estetycznie przyjemnych interfejsów użytkownika, Curtis cieszy się pracą z nowoczesnymi frameworkami i tworzeniem dobrze zorganizowanych, atrakcyjnych wizualnie podręczników.