How do I detect blanks between text characters using PXCp_ET.. methods?
Using the PXCp_ET_... methods I'm able to extract all text elements that are positioned inside a given area. Now I want to copy the found text to clipboard, preserving as much formatting as possible (line breaks and blanks). While I can do this by simply merging all the characters of the found text elements to a string, this procedure will loose any information about blanks between characters. Now I'm looking for a way to detect if, between two characters of a text element, there is a blank space.
In general, fonts in PDF may not contain information about space character width, because some PDF creators do not use space character at all, and may not include any information about it. I'm afraid there is no common algorithm to detect spaces, just some approximations. PXCp_ET_... functions cannot provide all information you need, but you may try to collect it using low-level API, when it is possible. But do not expect that solution will be easy.
You can download the PDF Reference manual here, Adobe PDF Reference
You can contact us by phone, email or our social media accounts — we are here to assist you.