Method FixEncoding
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
FixEncoding()
Fixes PDF font encoding if possible.
public bool FixEncoding()
Returns
- bool
true
if font encoding was updated; otherwise,false
.
Remarks
Some PDF generators produce PDF documents with broken font encodings. Extraction of text from such documents is not possible.
This method tries to fix font encoding in the PDF document. It reads information about encoding in the font bytes and updates PDF encoding correspondingly.
This method might fail to fix encoding in the following cases:
-
Font is not embedded. For such fonts the Embedded property is
false
. - Font bytes do not contain information about encoding.
- Font is of an unsupported type. For now, only Type0 fonts are supported.