The below SDK samples describe how to quickly make your application do flatten pdf form with pdf sdk in VB.NET with the help of ByteScout PDF Suite. Follow the steps-by-step instructions from the scratch to work and copy and paste code for VB.NET into your editor. Use of ByteScout PDF Suite in VB.NET is also described in the documentation included along with the product.
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.PDF ''' <summary> ''' This example demonstrates how to flatten a filled PDF form (make it uneditable). ''' </summary> Class Program Shared Sub Main() ' Load filled PDF form Dim pdfDocument = New Document("filled_form.pdf") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Flatten the form pdfDocument.FlattenDocument() ' Save modified document pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer app Process.Start("result.pdf") End Sub End Class