logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Wesley  
#1 Posted : Monday, October 21, 2019 7:36:27 PM(UTC)
Wesley

Rank: Newbie

Groups: Registered
Joined: 3/7/2019(UTC)
Posts: 4

Thanks: 1 times
Hi,

The pdf file has a lot of rectangles composed of lines, I need to extract the text inside the rectangles. So is there any way to get the lines or rectangles?

I uploaded the screenshot of part of the pdf file, and I need to get the "E-Mail ADDRESS:" and the text behind it.

Really thanks if anyone can help!

screenshot.png (9kb) downloaded 4 time(s).
Paul Rayman  
#2 Posted : Tuesday, October 22, 2019 8:39:59 PM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
Rectangles are actually paths, most likely consisting of five points (although there may be 4 points)
You can try to iterate through the collection of page objects, check all objects which type is PdfPathObject, and if they are a rectangle, then call the GetBoundedText Method
https://pdfium.patagames...fText_GetBoundedText.htm


thanks 2 users thanked Paul Rayman for this useful post.
Wesley on 10/23/2019(UTC), gffranca on 4/28/2020(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.