The SDK samples given below describe how to quickly make your application do create zugferd invoice with pdf sdk in VB.NET with the help of ByteScout PDF Suite. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample VB.NET codes.
All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to attach a file to PDF document. ''' </summary> Class Program Shared Sub Main() ' Create new PDF document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Load existing document pdfDocument.Load(".\Invoice.pdf") ' Attach ZUGFeRD XML file Dim fileAttachment As New Bytescout.PDF.FileAttachmentAnnotation(".\ZUGFeRD-invoice.xml", 0, 0, 0, 0) pdfDocument.Pages.Item(0).Annotations.Add(fileAttachment) ' Instruct PDF viewer applications to show attachment page on startup pdfDocument.PageMode = PageMode.Attachment ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open result document in default associated application (for demo puropse) Dim processStartInfo As New ProcessStartInfo("result.pdf") processStartInfo.UseShellExecute = True Process.Start(processStartInfo) End Sub End Class