start adding retrieval of annotations

This commit is contained in:
Eliot Jones
2018-12-20 18:18:32 +00:00
parent 9abf6e226c
commit a5349dd77a
11 changed files with 535 additions and 28 deletions

View File

@@ -0,0 +1,38 @@
namespace UglyToad.PdfPig.Tests.Integration
{
using System.Linq;
using Xunit;
public class CatGeneticsTests
{
private static string GetFilename()
{
return IntegrationHelpers.GetDocumentPath("cat-genetics.pdf");
}
[Fact]
public void CanReadContent()
{
using (var document = PdfDocument.Open(GetFilename()))
{
var page = document.GetPage(1);
Assert.Contains("catus", page.Text);
}
}
[Fact]
public void CanGetAnnotations()
{
using (var document = PdfDocument.Open(GetFilename(), new ParsingOptions { UseLenientParsing = false }))
{
var page = document.GetPage(1);
var annotations = page.GetAnnotations().ToList();
Assert.NotEmpty(annotations);
}
}
}
}