add test for svg exporter and escape xml characters

This commit is contained in:
Eliot Jones
2020-04-05 17:55:36 +01:00
parent 45ac8c8a60
commit 2a0a3fae69
2 changed files with 35 additions and 5 deletions

View File

@@ -1,4 +1,6 @@
namespace UglyToad.PdfPig.Tests.Integration
using UglyToad.PdfPig.DocumentLayoutAnalysis.Export;
namespace UglyToad.PdfPig.Tests.Integration
{
using System;
using System.Collections.Generic;
@@ -145,6 +147,19 @@ used per estimate, we introduce a “complement class” Naive Bayes is often us
Assert.StartsWith("<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'", text);
}
}
[Fact]
public void CanExportSvg()
{
using (var document = PdfDocument.Open(GetFilename(), new ParsingOptions{ ClipPaths = true }))
{
var page = document.GetPage(1);
var svg = new SvgTextExporter().Get(page);
Assert.NotNull(svg);
}
}
private static IReadOnlyList<AssertablePositionData> GetPdfBoxPositionData()
{