CcittFaxDecodeFilter: do not check for input length, invert bitmap with ref byte and fix #982
Some checks failed
Build and test / build (push) Has been cancelled
Run Integration Tests / build (push) Has been cancelled

This commit is contained in:
BobLd
2025-02-02 14:09:22 +00:00
parent 5209850af7
commit fdb8835b37
3 changed files with 24 additions and 8 deletions

View File

@@ -7,6 +7,24 @@
public class GithubIssuesTests
{
[Fact]
public void Issue982()
{
var path = IntegrationHelpers.GetSpecificTestDocumentPath("PDFBOX-659-0.pdf");
using (var document = PdfDocument.Open(path))
{
for (int p = 1; p <= document.NumberOfPages; ++p)
{
var page = document.GetPage(p);
foreach (var pdfImage in page.GetImages())
{
Assert.True(pdfImage.TryGetPng(out _));
}
}
}
}
[Fact]
public void Issue973()
{
@@ -25,11 +43,11 @@
using (var document = PdfDocument.Open(path, new ParsingOptions() { UseLenientParsing = false }))
{
var exception = Assert.Throws<InvalidOperationException>(() => document.GetPage(2));
Assert.Equal("Cannot execute a pop of the graphics state stack, it would leave the stack empty.", exception.Message);
Assert.Equal("Cannot execute a pop of the graphics state stack, it would leave the stack empty.",
exception.Message);
}
}
[Fact]
public void Issue959()
{