we run into problems using the product. It seems does some functions in iText 5.4.3 doesn’t working well? Please, can someone give us a hint how to solve that?
We modify src.pdf to dest.pdf as follows:
Function CreateFlattedPdf(ByRef originalPdf As Byte()) As Byte()
Dim retValue As Byte() = Nothing
Dim originalPdfReader As PdfReader = New PdfReader(originalPdf)
Dim pdfKopie As MemoryStream = New MemoryStream()
Dim pdfKopieStamper As PdfStamper = New PdfStamper(originalPdfReader, pdfKopie)
pdfKopieStamper.SetEncryption(False, userPassword, ownerPassword, _
PdfWriter.ALLOW_ASSEMBLY _
Or PdfWriter.ALLOW_COPY _
Or PdfWriter.ALLOW_DEGRADED_PRINTING _
Or PdfWriter.ALLOW_FILL_IN _
Or PdfWriter.ALLOW_MODIFY_ANNOTATIONS _
Or PdfWriter.ALLOW_MODIFY_CONTENTS _
Or PdfWriter.ALLOW_PRINTING _
Or PdfWriter.ALLOW_SCREENREADERS _
)
' Entferne die Signaturinformationen aus dem original Pdf-Dokument
pdfKopieStamper.FormFlattening = True
pdfKopieStamper.Close()
' Schreibe den Inhalt der geflatteten Kopie in die Antwort
retValue = pdfKopie.ToArray()
' Schließe die Bearbeitung des Dokumentes ab
pdfKopie.Close()
originalPdfReader.Close()
Return retValue
End Function
Besides, we put all possible i text rights. As a result we get a PDF where page withdrawal (page-extraction) and document arrangement (document compilation) is not allowed?!
My questions are:
- is this a misbehavior of iText, Or, can one change this setting with iText in generally? If so, how (code example)?
- Can one the set these rights without any password too? Till present we have seen only functions for the setting rights always in conjunction with users and owners password.
Thanks for your help in advance!
Ingo