Skip to content

Commit

Permalink
Merge pull request #137 from SyncfusionExamples/939954
Browse files Browse the repository at this point in the history
939954 Added PageSegment mode in the GitHub sample under OCR
  • Loading branch information
chinnumuniyappan authored Feb 17, 2025
2 parents 7b693bb + a0a01ab commit c482b43
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
PdfLoadedDocument document = new PdfLoadedDocument(stream);
//Set OCR language.
processor.Settings.Language = Languages.English;
// Set the page segmentation mode for the OCR processor.
// PageSegMode.AutoOsd determines the best way to segment the page automatically
processor.Settings.PageSegment = PageSegMode.AutoOsd;
//Initialize the OCR image processor.
processor.ImageProcessor = new ImageProcessor();
//Perform OCR with input document and tessdata (Language packs).
Expand Down

0 comments on commit c482b43

Please sign in to comment.