I'm using vb.net with itextsharp to collect several PDF-files including forms. The collected files are merged to one whole ".pdf" file using the itextsharp cb.AddTemplate-function (after eventually rotating and/or scaling them). By merging the files this way form data gets lost.
I've been able to "fix" text filled into pdf-form's text fields to the form by using:
before merging the file with other filesCode:stamper.FormFlattening = True
The problem not solved by using
is that the forms can have radio buttons too, which get lost when I'm using cd.AddTemplate.Code:stamper.FormFlattening = True
I've tried to set the fields to "Read-Only" using this:
The seems to be good for the worked original file. But after merging it the checks are gone.Code:Dim fields() As String = stamper.AcroFields.Fields.[Select](Function(x) x.Key).ToArray() For key As Integer = 0 To fields.Count - 1 stamper.AcroFields.SetFieldProperty(fields(key), "setfflags", PdfFormField.FF_READ_ONLY, Nothing) Next
Is there a possibility to fix/mount/burn the checks to the buttons?
Regards, Andreas




Reply With Quote
