We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Loosing attachment after encrypt

I add an attachment in an existing pdf and then I encrypt the pdf (with aspose.pdf.kit).

My attachment is gone after the encryption

Any idea ?


' Embed

Dim pCE As PdfContentEditor = New PdfContentEditor


pCE.AddDocumentAttachment(Input, PVNum.Text)


' Encrypt (attachment is present before encryption)

Dim fileSecurity As PdfFileSecurity

fileSecurity = New PdfFileSecurity(Output_Emb, Output_Enc)

fileSecurity.EncryptFile("", "test", PdfPrivilege.Copy Or PdfPrivilege.Print, False)


Please share the PDF file and the attachement file with us, so we could test the issue using your scenario. You’ll be updated accordingly.

We’re sorry for the inconvenience.

Hi Shahzad,

Find here the two files.

The pdf is generated with Word2007 (Save as PDF)

The docx file is a Word2007 document

Thanks in advance


Hi Jean-Marie,

I have logged this issue as PDFKITNET-15959 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.

The issues you have found earlier (filed as 15959) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.