New Forum | Previous | Next | (P-PDF) Developers
Topic: Character vs. Word offsets
Conf: (P-PDF) Developers, Msg: 130423
Date: 4/2/2005 03:33 AM
I'm trying to save offset information for certain text in a PDF file using the PDTextSelectGetRange API. The coordinates for the PDTextSelectRange structure that is returned are in "Words", as opposed to Characters, but the documentation says:
"While character offsets are well-defined quantities in a PDF file, word numbers are calculated by the PDWordFinder algorithm and, therefore, may change as the word finder algorithm is improved in future versions. Because of this, long-term storage of selection information (in custom annotations, for example) is safer if done with page-relative character offsets"
Is there a way to extract character-based offsets from a text selection?