←Select platform

DetectTextDecoration Property

Summary

Detects whether a line in a PDF file is to be converted to an underline or strikethrough text decoration.

Syntax
C#
Objective-C
C++/CLI
Java
Python
public bool DetectTextDecoration { get; set; } 
@property (nonatomic, assign) BOOL DetectTextDecoration 
public boolean getDetectTextDecoration() 
public void setDetectTextDecoration(boolean value) 
public: 
property bool DetectTextDecoration { 
   bool get(); 
   void set (    bool ); 
} 
DetectTextDecoration # get and set (CodecsPdfLoadOptions) 

Property Value

Value Description
true To enable automatic line detection whether they are underline or strikethrough text decorations. true is the default value.
false To disable automatic line detection whether they are underline or strikethrough text decorations.
Remarks

The value of this property is used only when converting PDF to SVG or in operations that use PDF to SVG conversions internally (such as the Document Converter).

Text decoration detection is fast, so it is turned on by default. This operation is necessary because PDF does not have the concept of underline or strikethrough text. Instead of marking the text as "underline", PDF writers add lines under or over the text. So if you convert PDF files containing text to another format (for example SVG, DOC/DOCX), if this property is disabled, the output files will have text and lines (the underline attribute of text will not be set). If this property is turned on, the text in the output file will be marked as underline or strikethrough.

It is best to leave this property on. But you can try to turn it off if you have conversion problems.

In most cases, set the value of this property using DocumentFactory.RasterCodecsTemplate. For example, to set this property to false, you will do something like this:

/* This is a C# example, but the example in other languages is very similar */ 
DocumentFactory.RasterCodecsTemplate.Options.Pdf.Load.DetectTextDecoration = false; 
Requirements

Target Platforms

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

Leadtools.Codecs Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.