diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/Various Content Types.pdf b/src/UglyToad.PdfPig.Tests/Integration/Documents/Various Content Types.pdf new file mode 100644 index 00000000..19c83395 Binary files /dev/null and b/src/UglyToad.PdfPig.Tests/Integration/Documents/Various Content Types.pdf differ diff --git a/src/UglyToad.PdfPig.Tests/Integration/PageContentTests.cs b/src/UglyToad.PdfPig.Tests/Integration/PageContentTests.cs new file mode 100644 index 00000000..222c74a0 --- /dev/null +++ b/src/UglyToad.PdfPig.Tests/Integration/PageContentTests.cs @@ -0,0 +1,24 @@ +namespace UglyToad.PdfPig.Tests.Integration +{ + using PdfPig.Core; + using Xunit; + + public class PageContentTests + { + [Fact] + public void DetectPageContents() + { + var file = IntegrationHelpers.GetDocumentPath("Various Content Types"); + + using (var document = PdfDocument.Open(file, ParsingOptions.LenientParsingOff)) + { + var page = document.GetPage(1); + var letters = page.Letters; + Assert.Contains(letters, l => l.RenderingMode == TextRenderingMode.Stroke); // "REGULAR TEXT" + Assert.Contains(letters, l => l.RenderingMode == TextRenderingMode.Neither); // "INVISIBLE TEXT" + Assert.NotEmpty(page.Content.GetImages()); + Assert.NotEmpty(page.Content.Paths); + } + } + } +}