mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-21 04:17:57 +08:00

temporary 'safe' untested implementation of seac for type 1 charstrings. make structure public bump version of package and project to 0.0.3 (it had accidentally increased to 0.0.5)
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
namespace UglyToad.PdfPig.Tests.Integration
|
|
{
|
|
using System.Linq;
|
|
using Xunit;
|
|
|
|
public class OldGutnishTests
|
|
{
|
|
private static string GetFilename()
|
|
{
|
|
return IntegrationHelpers.GetDocumentPath("Old Gutnish Internet Explorer.pdf");
|
|
}
|
|
|
|
[Fact]
|
|
public void HasCorrectNumberOfPages()
|
|
{
|
|
using (var document = PdfDocument.Open(GetFilename()))
|
|
{
|
|
Assert.Equal(3, document.NumberOfPages);
|
|
}
|
|
}
|
|
|
|
[Fact]
|
|
public void HasCorrectContentAfterReadingPreviousPage()
|
|
{
|
|
using (var document = PdfDocument.Open(GetFilename()))
|
|
{
|
|
var page = document.GetPage(1);
|
|
|
|
Assert.Contains("Þissi þieluar hafþi ann sun sum hit hafþi. En hafþa cuna hit huita stierna", page.Text);
|
|
|
|
page = document.GetPage(2);
|
|
|
|
Assert.Contains("Greipur sem annar hét; og Gunnfjón sá þriðji", page.Text);
|
|
}
|
|
}
|
|
|
|
[Fact]
|
|
public void GetsImageOnPageOne()
|
|
{
|
|
using (var document = PdfDocument.Open(GetFilename()))
|
|
{
|
|
var page = document.GetPage(1);
|
|
|
|
var images = page.ExperimentalAccess.GetRawImages().ToList();
|
|
Assert.Single(images);
|
|
}
|
|
}
|
|
}
|
|
} |