Skip to content

Commit

Permalink
added hint to nuget package and some example
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Seeland authored Dec 1, 2018
1 parent 7736083 commit 4783696
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,35 @@

# PdfAValidatorApi
PdfAValidatorApi wraps calls to [VeraPdf](http://www.preforma-project.eu/pdfa-conformance-checker.html) in a .net Core Assembly and as WebApi. Access VeraPdf from your unit tests or integrate it into your micro architecture.

Install it using nuget package [PdfAValidatorApi](https://www.nuget.org/packages/PdfAValidator/):
```
Install-Package PdfAValidator
```

Sample - e.g. use it in your unit test to check compliance of some pdf:
```C#
[Fact]
public void ShouldDetectCompliantPdfA()
{
using (var pdfAValidator = new PdfAValidator.PdfAValidator())
{
var result = pdfAValidator.Validate(@"./TestPdfFiles/FromLibreOffice.pdf");
Assert.True(result);
}
}
```

Sample - e.g. use it in your unit test to check the used sub standard of some pdf:
```C#
[Fact]
public void ShouldGetDetailedReportFromPdfA()
{
using (var pdfAValidator = new PdfAValidator.PdfAValidator())
{
var result = pdfAValidator.ValidateWithDetailedReport(@"./TestPdfFiles/FromLibreOffice.pdf");
Assert.True(result.jobs.job.validationReport.isCompliant);
Assert.True(result.jobs.job.validationReport.profileName == "PDF/A-1A validation profile");
}
}
```

0 comments on commit 4783696

Please sign in to comment.