@Tikane Could you please attach your source MS Word document along with the problematic output PDF document? We will check the issue and provide you more information.
output error:Screenshot 2021-11-12 150715.png (6.9 KB)
pdf: Merge document (12).pdf (551.5 KB)
password is: 5510094800086
@Tikane As I can see the problematic PDF document was produced or processed by
Aspose.Pdf. I tried converting and encrypting your document using the latest version of Aspose.Words and the resulting document can be successfully opened in Adobe Acrobat DC. I used the following code for conversion:
Document doc = new Document(@"C:\Temp\in.docx"); PdfEncryptionDetails encryptionDetails = new PdfEncryptionDetails("5510094800086", string.Empty, PdfEncryptionAlgorithm.RC4_128); PdfSaveOptions opt = new PdfSaveOptions(); opt.EncryptionDetails = encryptionDetails; doc.Save(@"C:\Temp\out.pdf", opt);
Hi @alexey.noskov the code you shared works, but Im currently saving the document on a memoryStream as a “.docx” and loading the document from the memoryStream then saving it as a pdfProtected, but the file gets corrupted.
image.png (7.5 KB)
@Tikane Could you please share your code that will allow us to reproduce the problem? We will check the issue and provide you more information.
sorry @alexey.noskov I confused the logic, the code works fine. thank you very much
@Tikane It is perfect that everything works fine now. Please feel free to ask in case of any issues.