Learn how to create zugferd invoice in VB.NET with this source code sample. What is ByteScout PDF SDK? It is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings. It can help you to create zugferd invoice in your VB.NET application.
You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF SDK for create zugferd invoice below and use it in your application. Follow the instructions from the scratch to work and copy the VB.NET code. Detailed tutorials and documentation are available along with installed ByteScout PDF SDK if you’d like to dive deeper into the topic and the details of the API.
Trial version of ByteScout PDF SDK can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
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