diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-1869-4-1.pdf b/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-1869-4-1.pdf new file mode 100644 index 000000000..a43e5d21f Binary files /dev/null and b/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-1869-4-1.pdf differ diff --git a/src/UglyToad.PdfPig.Tests/Integration/ShadingTests.cs b/src/UglyToad.PdfPig.Tests/Integration/ShadingTests.cs index d7007472a..4c77b3fd1 100644 --- a/src/UglyToad.PdfPig.Tests/Integration/ShadingTests.cs +++ b/src/UglyToad.PdfPig.Tests/Integration/ShadingTests.cs @@ -4,6 +4,16 @@ public class ShadingTests { + [Fact] + public void Issue702() + { + // Placeholder test for issue 702, the document contains a FunctionBasedShading + using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("PDFBOX-1869-4-1.pdf"))) + { + var page1 = document.GetPage(1); + } + } + [Fact] public void AxialRadial1() { diff --git a/src/UglyToad.PdfPig/Util/ShadingParser.cs b/src/UglyToad.PdfPig/Util/ShadingParser.cs index 2126059e0..6b9744154 100644 --- a/src/UglyToad.PdfPig/Util/ShadingParser.cs +++ b/src/UglyToad.PdfPig/Util/ShadingParser.cs @@ -144,7 +144,7 @@ private static FunctionBasedShading CreateFunctionBasedShading(DictionaryToken s } TransformationMatrix matrix; - if (shadingDictionary.TryGet(NameToken.Coords, scanner, out var matrixToken)) + if (shadingDictionary.TryGet(NameToken.Matrix, scanner, out var matrixToken)) { matrix = TransformationMatrix.FromArray(matrixToken.Data.OfType().Select(n => n.Data).ToArray()); }