←Select platform

DocumentConverterSvgImagesRecognitionMode Enumeration

Summary

Determines how image elements inside SVG documents are treated during SVG conversion.

Syntax
C#
VB
C++
Java
[SerializableAttribute()] 
[DataContractAttribute()] 
public enum DocumentConverterSvgImagesRecognitionMode 
<SerializableAttribute(),  
 DataContractAttribute()>  
Public Enum DocumentConverterSvgImagesRecognitionMode 
public [SerializableAttribute,  
   DataContractAttribute] 
   enum class DocumentConverterSvgImagesRecognitionMode sealed 
public enum DocumentConverterSvgImagesRecognitionMode 

Members

ValueMemberDescription
0AutoUse SVG engine unless the page is full raster.
1DisabledDo not use OCR recognition for the image elements. Instead, the image element is added as is to the final document.
2AlwaysUse OCR recognition on the image elements. The recognition data is added to the final document with the rest of the other SVG elements of the page. Requires a valid IOcrEngine set in the converter using SetOcrEngineInstance.

Remarks

DocumentConverterSvgImagesRecognitionMode is used as the type of the SvgImagesRecognitionMode property to determine how image elements are treated during SVG conversion.

The following table helps determine what would occur during conversion depending on the type of each DocumentPage in the input LEADDocument:

Value Page Type Behavior
Auto SVG with only text or mixed image and text elements Only the text elements are extracted
Auto SVG with raster elements only The image elements are recognized and text extracted using the OCR engine
Disabled SVG with only text or mixed image and text elements Only the text elements are extracted
Disabled SVG with raster elements only No text is extracted
Always SVG with only text or mixed image and text elements The text elements are extracted and The image elements are recognized and text extracted using the OCR engine
Always SVG with raster elements only The image elements are recognized and text extracted using the OCR engine

The engine will use DocumentPage.IsSvgSupported and DocumentPage.IsSvgConversionPreferred as well as checking the SVG of the page elements (returned by DocumentPage.GetSvg) to perform the actions described above.

When Always is used, a valid (started) IOcrEngine set in the converter using SetOcrEngineInstance.

When Auto is used, a valid (started) IOcrEngine instance should be set in SetOcrEngineInstance. If this value is null, then the engine will behave as if Disabled was used.

Note: When using OcrEngineType.LEAD engine, DocumentPage.GetText will try to optimize the speed of OCR recognition for text format output (for instance, will not try to recognize the font decorations such as bold or italic). This is done by checking if Recognition.AutoRecognizeManager.FormatSpeedOptimized is true (the default value). This optimization may result in DocumentPage.GetText producing slightly different recognition on complex input raster images than IOcrPage.GetText which does not use the value of the setting. Therefore, if producing the same exact results from the two methods is desired, set the value of the setting to false in the IOcrEngine used with the document. Refer to LEADTOOLS OCR Module - LEAD Engine Settings for more information.

Requirements

Target Platforms

Help Version 20.0.2020.5.20
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Converter Assembly