Flatten PDF Form - VBScript and VB6
PDF SDK sample in VBScript and VB6 demonstrating ‘Flatten PDF Form’
Flatten Form.vbs
' This example demonstrates how to submit or reset form.
' Create Bytescout.PDF.Document object
Set pdfDocument = CreateObject("Bytescout.PDF.Document")
pdfDocument.RegistrationName = "demo"
pdfDocument.RegistrationKey = "demo"
' Load filled PDF form
pdfDocument.Load("filled_form.pdf")
' Flatten the form
pdfDocument.FlattenDocument()
' Save document to file
pdfDocument.Save("result.pdf")
' Open document in default PDF viewer app
Set shell = CreateObject("WScript.Shell")
shell.Run "result.pdf", 1, false