-
Notifications
You must be signed in to change notification settings - Fork 229
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
Allow reading orders dectors to support any class that has a bounding box/PdfRectangle #855
Comments
@davebrokit I was thinking of doing similar, please go ahead and implement your idea. I did a similar interface for my project https://github.com/BobLd/Caly/blob/master/Caly.Pdf/Models/IPdfTextElement.cs feel free to reuse that or not. I think the |
Currently the interface
IReadingOrderDetector
relies onTextBlock
as a parameter. This limits it's use to theTextBlock
class.I propose adding an
IBoundingBox
interfaceThen changing
IReadingOrderDector
interface and implementing classes to useIBoundingBox
as it's parameterAdding an overload that takes a
Func<T, PdfRectangle>
would allow the caller to specify any bounding box making the interface more useful.Breaking changes: The
IReadingOrderDector
will instead return anIReadOnlyList<T>
which will be the ordered results. This would meanTextBlock.ReadingOrder
is not set which is a breaking change. But some code can be added that if type T isTextBlock
thenReadingOrder
is setHappy to make the changes
The text was updated successfully, but these errors were encountered: