mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
add content order text extractor and example of use
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace UglyToad.PdfPig.Tests.Integration
|
||||
using UglyToad.PdfPig.DocumentLayoutAnalysis.TextExtractor;
|
||||
|
||||
namespace UglyToad.PdfPig.Tests.Integration
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -159,6 +161,19 @@ used per estimate, we introduce a “complement class”
Naive Bayes is often us
|
||||
Assert.NotNull(svg);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanExtractContentOrderText()
|
||||
{
|
||||
using (var document = PdfDocument.Open(GetFilename()))
|
||||
{
|
||||
foreach (var page in document.GetPages())
|
||||
{
|
||||
var text = ContentOrderTextExtractor.GetText(page);
|
||||
Assert.NotNull(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static IReadOnlyList<AssertablePositionData> GetPdfBoxPositionData()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user