mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 03:17:57 +08:00
Add test case, that test that we lower the object count
This commit is contained in:
@@ -79,5 +79,21 @@
|
|||||||
Assert.Equal(3, document.NumberOfPages);
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user