I generate a font using the following VB statement:
dim theFont = ceTe.DynamicPDF.Font.LoadSystemFont("Consolas")
I build an entire document with this font. Part of the document contains the string "219120‐2304". Later when we try to search the document while open in Adobe Reader XI, it can't find this string (but it has no problem finding 219120).
Further investigation has determined that the hyphen in that string is being rendered in the generated PDF file as character U+2010, even though we are providing the TextArea constructor with text that has the hyphen at U+002D, i.e. your basic ASCII hyphen (45 decimal).
This doesn't happen when the standard Courier New font is used, only when using Consolas.
How can we prevent this from happening while still using the Consolas font?
Searching the PDF
Re: Searching the PDF
Support · Nov 6, 2015Hello,
Our technical team looked into this issue found that the Consolas font has the hyphen character mapped to multiple Unicode values (U+002D & U+2010). When our API queries the font to obtain the unicode value for hyphen, the Consolas font is returning two Unicode values. In this case our API is designed to take the last value (U+2010) returned by the font. Currently it is not possible to override this designed behavior. This issue doesn’t happen with the standard Courier font because it has only one Unicode value (U+002D) mapped to the hyphen character.
Thanks,
ceTe Software Support Team.
Re: Searching the PDF
Forum member · Nov 6, 2015It would be preferable if the API choice was the actual character I supplied . After all, one can type in the 002D hyphen in on a standard keyboard--considerably less easy to type in the 2010 hyphen, and that assumes the user recognizes the need to do so. (These hyphens look alike, after all.)
Do you have plans to fix this? Is it different in v8.x?
Re: Searching the PDF
Support · Nov 6, 2015Hello,
The behavior is the same in v8.x. We will add this to our feature request list and consider changing this behavior for a future version.
Thanks,
ceTe Software Support Team.