Hi @awais.hafeez Im facing the same problem but with a password protected pdf, on google pdf view, it opens but on adobe acrobat reader it doesn’t openScreenshot 2021-11-12 150715.png (6.9 KB)
@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.
Hi @alexey.noskov here is the ms word document
Merge document.docx (243.8 KB)
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.
@Tikane It is perfect that everything works fine now. Please feel free to ask in case of any issues.