Add test case, that test that we lower the object count

This commit is contained in:
InusualZ
2020-03-08 15:58:11 -03:00
committed by Eliot Jones
parent b3f310a249
commit 26f92a9630

View File

@@ -79,5 +79,21 @@
Assert.Equal(3, document.NumberOfPages);
}
}
[Fact]
public void ObjectCountLower()
{
var one = IntegrationHelpers.GetDocumentPath("Single Page Simple - from inkscape.pdf");
var two = IntegrationHelpers.GetDocumentPath("Single Page Simple - from inkscape.pdf");
var result = PdfMerger.Merge(one, two);
using (var document = PdfDocument.Open(result, ParsingOptions.LenientParsingOff))
{
Assert.Equal(2, document.NumberOfPages);
Assert.True(document.Structure.CrossReferenceTable.ObjectOffsets.Count < 24,
"Expected object count to be lower than 24");
}
}
}
}