-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Stream: Area detection hangs on PDF page #30
Comments
I have also encountered this hang and had to stop using this library unfortunately. |
@kirk-marple, don't have an answer necessarily, but it looks like it's having a problem with the graphs on that page. In that section the following if condition never resolves to True, meaning that the Table it has found doesn't contain the textRow. This is because the textRow Left and Bottom values extend beyond the Table's bounds. There's a lot of bounds detection code in this algorithm that needs more looking at, but I don't have the time. The simplest thing to do would be to "skip" page 98. (which has a page number of 87 at the bottom of the page in the pdf). It has two graphs on the page and that may be complicating the algorithm. Good luck.
|
Same issue here :( |
Are you willing to share the PDF that this is occurring on? In the case of the OP it was on a page that contained a somewhat complicated graph. |
Yes, here is an example where the issue occurs. |
@LuisM000, thanks. I found the area of code where the Detect logic is hanging. There appears to be an infinite do/while loop that for certain cases is always true. I've drafted Pull Request #33 and created a sample project mikelor/tabulate that has a simple fix, but it hasn't fully been tested yet. I mainly use the spreadsheet detection algorithm, and use the ExtractionAlgorithms more than the Detectors. Do you have some sample code that you can share? See mikelor/tsathroughput for an exaple using Extractors vs Detectors. |
Hi @mikelor! Thanks for helping to try and fix the bug :) Yes, I noticed that it hangs in the do/while loop, but I haven't had time to investigate further and it's quite complex code. It looks like the change you made in your PR doesn't break any tests, but unfortunately, I don't have a comprehensive test suite to verify if this change affects detection in any cases. In my case, I use the |
Describe the bug
When attempting to extract tables from this 250+ page PDF, I found that it hangs on a specific page (98), in the 'Detect' method.
To Reproduce
Using 40927R03.pdf
I've tried with 0.1.3 and 0.1.4-alpha001, and got hang in same spot.
Using .NET 6.0, C#.
Expected behavior
To properly parse all tables.
The text was updated successfully, but these errors were encountered: