VB.NET code snippet like this for ByteScout PDF Suite works best when you need to quickly implement zugferd invoice extraction with pdf extractor sdk in your VB.NET 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! Enjoy writing a code with ready-to-use sample VB.NET codes to implement zugferd invoice extraction with pdf extractor sdk using ByteScout PDF Suite.
ByteScout PDF Suite is available as a free trial. You may get it from our website along with all other source code samples for VB.NET applications.
Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) ' Create Bytescout.PDFExtractor.AttachmentExtractor instance Dim extractor As New AttachmentExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile(".\ZUGFeRD-invoice.pdf") Dim i As Integer ' Extract the XML invoice that is stored as an attachment For i = 0 To extractor.Count - 1 Console.WriteLine("Saving XML attachment: " + extractor.GetFileName(i)) ' Save file to current folder extractor.Save(i, extractor.GetFileName(i)) Console.WriteLine("Done.") Next ' Cleanup extractor.Dispose() Console.WriteLine() Console.WriteLine("Press any key...") Console.ReadLine() End Sub End Class