mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
CcittFaxDecodeFilter: do not check for input length, invert bitmap with ref byte and fix #982
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user