Rank: Newbie
Groups: Registered
Joined: 11/1/2019(UTC) Posts: 9  Location: Rio de Janeiro Thanks: 2 times
|
I want to find underlined words in a pdf. PdfTextObject class doesn't show such information. How can I get those?
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 935
Thanks: 3 times Was thanked: 112 time(s) in 109 post(s)
|
According to the PDF specification, text objects do not have such an attribute as "underlined word". The underline effect is achieved by using specialized annotations. Try the following code: Code:
foreach (var annot in page.Annots)
{
if (!(annot is PdfUnderlineAnnotation))
continue;
string text = page.Text.GetBoundedText(annot.Rectangle);
}
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 11/1/2019(UTC) Posts: 9  Location: Rio de Janeiro Thanks: 2 times
|
My key and version dont give access to page.Annots, i havent renew it yet.
I have a Word document with underlined words that i need to export it like a PDF to work with it. Those underlined words will be reachable with page.Annots method? It seems that whith page.Annots i can just find annotations made after it became a PDF. Thanks in advance.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 935
Thanks: 3 times Was thanked: 112 time(s) in 109 post(s)
|
|
|
|
|
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