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
Cookies are necessary in order to enable you to move around the website and use its features, including making purchases through our online store.
We need cookies in order to determine the number of unique users who visit the site, and to provide certain features, such as the login functionality.
We do not use cookies for advertising purposes.
By clicking Accept (or continuing to use the site) you are agreeing to our use of these tools. Learn More
These cookies are necessary for the website to function and cannot be switched off in PDF-XChange systems.
They are usually only set in response to actions made by you that result in a request for services, such as setting your privacy preferences, logging in, or filling in forms.
You can change the settings in your browser to block or alert you about these cookies, but doing so will result in some parts of the site losing functionality.
These cookies do not store any personally identifiable information.
You can contact us by phone, email or our social media accounts — we are here to assist you.