Describe the bug
ObjectExtractor.Extract() produces a PageArea with top=0 and bottom=-612. Only happens on certain PDFs, and I'm not sure what causes it.
To Reproduce
I can send the PDF privately. Don't want to expose any proprietary information online.
using (PdfDocument doc = PdfDocument.Open(filePath, new ParsingOptions() { ClipPaths = true }))
{
foreach (UglyToad.PdfPig.Content.Page page in doc.GetPages())
{
var extractor = new ObjectExtractor(doc);
var pageArea = extractor.Extract(page.Number);
}
}
Expected behavior
I would expect top/bottom to always be positive. left and right attributes don't ever seem to display this behavior.
Screenshots

Additional context
My workaround is to detect this particular scenario and change the way I'm creating the PdfRectangle. I've also seen other scenarios where top=-612 and bottom=0, and height=-612. Probably a similar issue.
Describe the bug
ObjectExtractor.Extract()produces aPageAreawithtop=0andbottom=-612. Only happens on certain PDFs, and I'm not sure what causes it.To Reproduce
I can send the PDF privately. Don't want to expose any proprietary information online.
Expected behavior
I would expect
top/bottomto always be positive.leftandrightattributes don't ever seem to display this behavior.Screenshots

Additional context
My workaround is to detect this particular scenario and change the way I'm creating the
PdfRectangle. I've also seen other scenarios wheretop=-612andbottom=0, andheight=-612. Probably a similar issue.