mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 20:07:57 +08:00
start adding retrieval of annotations
This commit is contained in:
38
src/UglyToad.PdfPig.Tests/Integration/CatGeneticsTests.cs
Normal file
38
src/UglyToad.PdfPig.Tests/Integration/CatGeneticsTests.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
src/UglyToad.PdfPig.Tests/Integration/Documents/cat-genetics.pdf
Normal file
BIN
src/UglyToad.PdfPig.Tests/Integration/Documents/cat-genetics.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user