Control Hyphenation

There are two types of hyphens in a PDF document:

  • A soft hyphen is added to a word by a word processor to divide the word across two lines. This is a discretionary hyphen and is used to ensure proper text flow in justified text.
  • A hard hyphen is intentionally added to a word regardless of the word's position in the text flow. It is required by the rules of grammar or word usage. For example, compound words (such as three-week vacation and self-confident) contain hard hyphens.

By default, KeyView skips the source document's soft hyphens in the Filter output to provide more searchable text content. However, if you want to maintain the document layout, you can keep soft hyphens in the Filter output. To keep soft hyphens, you must enable the soft hyphen flag in formats.ini or in the API.

Use the formats.ini File

To keep soft hyphens by using the formats.ini file, set the following parameter:

[pdf_flags]
keepsofthyphen=TRUE

Use the C API

To keep soft hyphens by using the C API, call the fpSetConfig() function with the following arguments:

Argument

Parameter

nType

KVFLT_KEEPSOFTHYPHEN

nValue

TRUE

pData

NULL

For example:

(*fpSetConfig)(pKVFilter, KVFLT_KEEPSOFTHYPHEN, TRUE, NULL);