Save time on writing and testing code by using the code below and use it in your application. Just copy and paste this VB.NET sample code to your VB.NET application’s code editor, add a reference to ByteScout PDF Suite (if you haven’t added yet) and you are ready to go! Use of ByteScout PDF Suite in VB.NET is also described in the documentation included along with the product.
Trial version can be downloaded from our website for free. It contains this and other source code samples for VB.NET.
Imports System Imports Bytescout.PDFExtractor Namespace PDFATest Class Program Shared Sub Main(ByVal args As String()) ' Create Bytescout.PDFExtractor.PDFAValidator instance Dim validator As New PDFAValidator() validator.RegistrationName = "demo" validator.RegistrationKey = "demo" ' Load sample PDF document validator.LoadDocumentFromFile("sample1.pdf") If validator.IsPDFA Then Console.WriteLine("This file conforms to the PDF/A standard") Else Console.WriteLine("This file doesn't conform to the PDF/A standard.") Console.WriteLine("Issues:") For Each validationError As String In validator.ValidationErrors Console.WriteLine(validationError) Next End If ' Cleanup validator.Dispose() Console.WriteLine() Console.WriteLine("Press any key...") Console.ReadKey() End Sub End Class End Namespace