I combined files "A.pdf " and "B.pdf" to create the file "PackagePDF_A_B_.pdf" and when I open the package file "PackagePDF_A_B_.pdf", I get several pop window "Malformed SOM Expression message:..." for the fillable fileds. Here is the code I am using
//Instantiate PdfFileEditor object
PdfFileEditor pdfEditor = new PdfFileEditor();
//Call Concatenate method of PdfFileEditor object to concatenate all input streams into a single output stream
bool merged = pdfEditor.Concatenate(InputFiles, OutputFile);
// open the file to get the stream
Stream PdfFile;
//Instantiating PdfFileSecurity object
PdfFileSecurity fileSecurity = new PdfFileSecurity(OutputFile, EncryptedOutputFile);
//Calling EncryptFile method to encrypt the PDF document
//Way2: Based on a predefined privilege and change some specifical permissions.
DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;
privilege.AllowCopy = true;
privilege.AllowPrint = true;
privilege.AllowFillIn = true;
privilege.AllowScreenReaders = true;
privilege.AllowModifyContents = false;
privilege.AllowModifyAnnotations = true;
bool encrypted = fileSecurity.SetPrivilege("", "ownerpassword", privilege);
if (!encrypted)
throw new ApplicationException("Unable to encrypt input files");
// open the file to get the stream
PdfFile = File.OpenRead(EncryptedOutputFile);
PackageByteArray = WebHelper.ReadStream(PdfFile, 1000);
PdfFile.Close();
return PackageByteArray;
thanks
Alvaro