Improve HasFormXObjectCircularReference and fix #1250

This commit is contained in:
BobLd
2026-02-15 17:48:48 +00:00
parent f732718852
commit 0a2b1e076f
3 changed files with 76 additions and 8 deletions

View File

@@ -11,6 +11,31 @@
public class GithubIssuesTests
{
[Fact]
public void Issues1250()
{
// Issue comes from HasFormXObjectCircularReference
var path = IntegrationHelpers.GetDocumentPath("SPE8EF26T0545.pdf");
using (var document = PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = true }))
{
var page = document.GetPage(1);
Assert.NotNull(page);
Assert.NotEmpty(page.Letters);
page = document.GetPage(7);
Assert.NotNull(page);
Assert.NotEmpty(page.Letters);
}
// Ensure still no StackOverflowException
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("issue_671")))
{
var page = document.GetPage(1);
Assert.NotNull(page);
Assert.NotEmpty(page.Letters);
}
}
[Fact]
public void Issues1248()
{
@@ -29,7 +54,7 @@
}
}
}
[Fact]
public void Issues1238()
{