Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
Looking for a logic to join individual characters from GetCharacter into logical words
Rank: Newbie
Groups: Registered
Joined: 8/17/2019(UTC) Posts: 6 
|
Hi All, I am evaluating Pdfium.Net SDK fora project that involves reading PDF content. Consider a PDF document with the words Hello WorldI have no problems in getting the individual characters "H","e","l","l",etc. using the function GetCharacter and their physical dimensions using GetCharBox. This has worked very well so far. I need some way to predict the width of the SPACE character in the context of the text at the location so that I can frame a logic to join "H","e","l","l","o" into a single word "Hello". My approach If the gap between "H" and "e" is less than the width of SPACE character for the font then join into "H" and "e" into "He" Is this possible? Or is some other way to achieve the same. Thanks, Sau Edited by user Saturday, August 17, 2019 4:09:12 AM(UTC)
| Reason: Changed subject to make more sense
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
FPDFTextObj_GetSpaceCharWidth(textObject.Handle, out space) ? ahh ... are you using PdfText? In this case, you can use GetText to get the text as a string and divide it into words by spaces Edited by user Monday, August 19, 2019 7:47:21 AM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/17/2019(UTC) Posts: 6 
|
|
|
|
|
|
|
Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
Looking for a logic to join individual characters from GetCharacter into logical words
Forum Jump
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close