Skip to content

VerifyTests/Verify.Syncfusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify.Syncfusion

Discussions Build status NuGet Status

Extends Verify to allow verification of documents via Syncfusion File Formats.

Converts documents (pdf, docx, xslx, and pptx) to png/csv/text for verification.

See Milestones for release notes.

An Syncfusion License is required to use this tool.

NuGet package

https://nuget.org/packages/Verify.Syncfusion/

Usage

[ModuleInitializer]
public static void Initialize() =>
    VerifySyncfusion.Initialize();

snippet source | anchor

PDF

Verify a file

[Test]
public Task VerifyPdf() =>
    VerifyFile("sample.pdf");

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyPdfStream()
{
    var stream = new MemoryStream(File.ReadAllBytes("sample.pdf"));
    return Verify(stream, "pdf");
}

snippet source | anchor

Result

{
  PageCount: 2,
  Author: ,
  CreationDate: DateTime_1,
  Creator: RAD PDF,
  CustomMetadata: [],
  Keywords: ,
  ModificationDate: DateTime_2,
  Producer: RAD PDF 3.9.0.0 - http://www.radpdf.com,
  Subject: ,
  Title: 
}

snippet source | anchor

Samples.VerifyPdf.01.verified.png:

Excel

Verify a file

[Test]
public Task VerifyExcel() =>
    VerifyFile("sample.xlsx");

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyExcelStream()
{
    var stream = new MemoryStream(File.ReadAllBytes("sample.xlsx"));
    return Verify(stream, "xlsx");
}

snippet source | anchor

Result

{
  CodeName: ThisWorkbook,
  Date1904: false,
  HasMacros: false,
  DisableMacrosStart: false,
  DetectDateTimeInValue: true,
  ArgumentsSeparator: ,,
  DisplayWorkbookTabs: true,
  IsRightToLeft: false,
  IsWindowProtection: false,
  Version: Xlsx,
  IsCellProtection: false,
  ReadOnly: false,
  ReadOnlyRecommended: false,
  StandardFont: Arial,
  StandardFontSize: 10.0
}

snippet source | anchor

Created with a trial version of Syncfusion Excel library or registered the wrong key in your application. Go to www.syncfusion.com/account/claim-license-key to obtain the valid key.
0, First Name, Last Name, Gender, Country, Age, Date, Id
1, Dulce, Abril, Female, United States, 32, 15/10/2017, 1562
2, Mara, Hashimoto, Female, Great Britain, 25, 16/08/2016, 1582
3, Philip, Gent, Male, France, 36, 21/05/2015, 2587
4, Kathleen, Hanner, Female, United States, 25, 15/10/2017, 3549
5, Nereida, Magwood, Female, United States, 58, 16/08/2016, 2468
6, Gaston, Brumm, Male, United States, 24, 21/05/2015, 2554
Created with a trial version of Syncfusion Excel library or registered the wrong key in your application. Go to www.syncfusion.com/account/claim-license-key to obtain the valid key.

snippet source | anchor

Word

When verifying a Word file or stream, both the textual content of the Word file as well as a png export of the pages in the Word file are verified.

Verify a file

[Test]
public Task VerifyWord() =>
    VerifyFile("sample.docx");

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyWordStream()
{
    var stream = new MemoryStream(File.ReadAllBytes("sample.docx"));
    return Verify(stream, "docx");
}

snippet source | anchor

Result

{
  LastAuthor: Simon Cropp,
  Company: ,
  LinesCount: 9,
  ParagraphCount: 10,
  WordCount: 178,
  PageCount: 1,
  ApplicationName: Microsoft Office Word,
  CreateDate: DateTime_1,
  RevisionNumber: 3
}

snippet source | anchor

Created with a trial version of Syncfusion Word library or registered the wrong key in your application. Go to "www.syncfusion.com/account/claim-license-key" to obtain the valid key.
Lorem ipsum 

  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ac faucibus odio. 

Vestibulum neque massa, scelerisque sit amet ligula eu, congue molestie mi. Praesent ut varius sem. Nullam at porttitor arcu, nec lacinia nisi. Ut ac dolor vitae odio interdum condimentum. Vivamus dapibus sodales ex, vitae malesuada ipsum cursus convallis. Maecenas sed egestas nulla, ac condimentum orci. Mauris diam felis, vulputate ac suscipit et, iaculis non est. Curabitur semper arcu ac ligula semper, nec luctus nisl blandit. Integer lacinia ante ac libero lobortis imperdiet. Nullam mollis convallis ipsum, ac accumsan nunc vehicula vitae. Nulla eget justo in felis tristique fringilla. Morbi sit amet tortor quis risus auctor condimentum. Morbi in ullamcorper elit. Nulla iaculis tellus sit amet mauris tempus fringilla.
Maecenas mauris lectus, lobortis et purus mattis, blandit dictum tellus.
* Maecenas non lorem quis tellus placerat varius. 
* Nulla facilisi. 
* Aenean congue fringilla justo ut aliquam. 
* Mauris id ex erat. Nunc vulputate neque vitae justo facilisis, non condimentum ante sagittis. 
* Morbi viverra semper lorem nec molestie. 
* Maecenas tincidunt est efficitur ligula euismod, sit amet ornare est vulputate.

Created with a trial version of Syncfusion Word library or registered the wrong key in your application. Go to "www.syncfusion.com/account/claim-license-key" to obtain the valid key.

snippet source | anchor

Samples.VerifyWord#00.verified.png:

Samples.VerifyWord#01.verified.png:

PowerPoint

Verify a file

[Test]
public Task VerifyPowerPoint() =>
    VerifyFile("sample.pptx");

snippet source | anchor

Verify a Stream

[Test]
public Task VerifyPowerPointStream()
{
    var stream = new MemoryStream(File.ReadAllBytes("sample.pptx"));
    return Verify(stream, "pptx");
}

snippet source | anchor

Result

{
  Title: Lorem ipsum,
  Subject: ,
  Author: Simon Cropp,
  Keywords: ,
  Comments: ,
  Template: ,
  LastAuthor: Simon Cropp,
  RevisionNumber: 1,
  LastPrinted: DateTime_1,
  CreationDate: DateTime_2,
  LastSaveDate: DateTime_3,
  WordCount: 231,
  PresentationTarget: Custom,
  ParagraphCount: 14,
  SlideCount: 3,
  NoteCount: 3,
  ScaleCrop: false,
  LinksDirty: false,
  ApplicationName: Microsoft Office PowerPoint
}

snippet source | anchor

Samples.VerifyPowerPoint.01.verified.png:

File Samples

http://file-examples.com/

Icon

Boxes designed by Amelia from The Noun Project.

About

Extends Verify to allow verification of documents via Syncfusion File Formats.

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •  

Languages