c1ddf67ac6 | ||
---|---|---|
.github | ||
src | ||
.gitignore | ||
code_of_conduct.md | ||
license.txt | ||
readme.md |
readme.md
Verify.GrapeCity
Extends Verify to allow verification of documents via GrapeCity Documents API.
Converts documents (pdf, docx, and xslx) to png for verification.
An GrapeCity License is required to use this tool.
NuGet package
https://nuget.org/packages/Verify.GrapeCity/
Usage
Enable Verify.GrapeCity
using VerifyTests;
public static class ModuleInitializer
{
[ModuleInitializer]
public static void Initialize()
{
VerifyGrapeCity.Initialize();
}
}
Verify a file
[Test]
public Task VerifyPdf()
{
return Verifier.VerifyFile("sample.pdf");
}
Verify a Stream
[Test]
public Task VerifyPdfStream()
{
return Verifier.Verify(File.OpenRead("sample.pdf"))
.UseExtension("pdf");
}
Result
{
Title: ,
Author: ,
CreationDate: DateTimeOffset_1,
ModifyDate: DateTimeOffset_2,
Subject: ,
Keywords: ,
Creator: RAD PDF,
Producer: RAD PDF 3.9.0.0 - http://www.radpdf.com
}
Samples.VerifyPdf.01.verified.png:
Excel
Verify a file
[Test]
public Task VerifyExcel()
{
return Verifier.VerifyFile("sample.xlsx");
}
Verify a Stream
[Test]
public Task VerifyExcelStream()
{
return Verifier.Verify(File.OpenRead("sample.xlsx"))
.UseExtension("xlsx");
}
Result
{
BuiltInDocumentProperties: {},
CustomDocumentProperties: {},
DefaultTableStyle: TableStyleMedium2,
EnableCalculation: true
}
Samples.VerifyExcel.01.verified.png:
Word
Verify a file
[Test]
public Task VerifyWord()
{
return Verifier.VerifyFile("sample.docx");
}
Verify a Stream
[Test]
public Task VerifyWordStream()
{
return Verifier.Verify(File.OpenRead("sample.docx"))
.UseExtension("docx");
}
Result
{
Pages: 1,
ApplicationName: Microsoft Office Word,
AplicationVersion: 16.0,
Company: ,
CreatedTime: DateTime_1,
Language: en-US,
Security: None,
RevisionNumber: 3,
DefaultFont: Liberation Serif
}
Samples.VerifyWord.01.verified.png:
File Samples
Icon
Grapes designed by Ale Em from The Noun Project.