Leadtools.Document Deprecated as of v16. Refer to: Leadtools.Forms.Ocr | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
SpecialMissingSymbol Property
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : SpecialMissingSymbol Property



The character used to replace missing characters in the last recognition process or save results process.

Syntax

Visual Basic (Declaration) 
Public Property SpecialMissingSymbol As Char
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value As Char
 
instance.SpecialMissingSymbol = value
 
value = instance.SpecialMissingSymbol
C# 
public char SpecialMissingSymbol {get; set;}
C++/CLI 
public:
property char SpecialMissingSymbol {
   char get();
   void set (char value);
}

Return Value

The character used to replace missing characters in the last recognition process or save results process.

Example

Visual BasicCopy Code
Public Sub SpecialMissingSymbolPropertyExample()
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance
   rasterDocument.Startup()
   'assume page is added, refer to AddPage example for more information

   rasterDocument.RecognitionDataFileName = LeadtoolsExamples.Common.ImagesPath.Path + "test.rdf"
   rasterDocument.SpellLanguageId = RasterDocumentLanguage.English

   rasterDocument.Recognize(0, 1, Nothing)
   If rasterDocument.SpecialMissingSymbol = "^"c Then
      rasterDocument.SpecialMissingSymbol = "^"c
   End If

   If rasterDocument.SpecialRejectedCharacter = "!"c Then
      rasterDocument.SpecialRejectedCharacter = "!"c
   End If

   ' ...
   ' ... save recognition results using SaveDocument
   ' ...

   rasterDocument.SaveResultsToFile(LeadtoolsExamples.Common.ImagesPath.Path + "ocr1.doc")
   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void SpecialMissingSymbolPropertyExample() 

   // Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(RasterSupportType.Ocr, "TestKey"); 
   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
   rasterDocument.Startup(); 
 
   // assume page is added, refer to AddPage example for more information 
 
   rasterDocument.RecognitionDataFileName = LeadtoolsExamples.Common.ImagesPath.Path + "test.rdf"; 
   rasterDocument.SpellLanguageId = RasterDocumentLanguage.English; 
 
   rasterDocument.Recognize(0, 1, null); 
   if (rasterDocument.SpecialMissingSymbol == '^') 
      rasterDocument.SpecialMissingSymbol = '^'; 
 
   if (rasterDocument.SpecialRejectedCharacter == '!') 
      rasterDocument.SpecialRejectedCharacter = '!'; 
 
   // ... 
   // ... save recognition results using SaveDocument 
   // ... 
 
   rasterDocument.SaveResultsToFile(LeadtoolsExamples.Common.ImagesPath.Path + "ocr1.doc"); 
   rasterDocument.Shutdown(); 
}

Remarks

Sets the special character to be used to replace missing characters in the next recognition process and save results process. To recognize a page(s), call Recognize.
When set, the engine will replace all missing characters with this newly set special character. This helps the user find the missing or rejected characters with minimal effort when the recognition results are saved to a file.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

The Leadtools.Document namespace is deprecated and no longer supported as of LEADTOOLS v16. For v16 and later, please refer to: Leadtools.Forms.Ocr. This documentation is retained for v15 and earlier informational use only.