hi aspose team,
Why is this security block issue coming after generating the pdf file?
image.png (62.7 KB)
Is there any way to unblock the pdf file ?
hi aspose team,
Why is this security block issue coming after generating the pdf file?
image.png (62.7 KB)
Is there any way to unblock the pdf file ?
Cause
The security block issue you’re encountering with the generated PDF file is likely due to the security settings applied during the PDF creation process. These settings can restrict access, editing, or printing of the document, leading to the block you are experiencing.
Solution
To unblock the PDF file, you can either modify the security settings during the PDF generation or decrypt the PDF after it has been created. Here are the steps for both approaches:
Modify Security Settings During PDF Generation:
Ensure that you set the appropriate permissions when creating the PDF. You can specify the security settings to allow certain actions like printing or editing.
Decrypt the PDF File:
If the PDF is already created and you want to remove the security restrictions, you can use Aspose.PDF to decrypt the file. Here’s a simple code snippet to do that:
using Aspose.Pdf;
// Load the encrypted PDF document
Document pdfDocument = new Document("path/to/encrypted.pdf", "your_password");
// Save the decrypted document
pdfDocument.Save("path/to/decrypted.pdf");
Next Steps
Please proceed with these steps and let me know if you need further assistance!
The pdf file is converted from a word document and there is no password or any encryption/decryption. No security settings changes as well.
Can you please share a bit more details like how you are converting word file into PDF document? Are you using Aspose.Words?
this is how we are converting into pdf file from a word document. There is no change to any setting or permission. The pdf file is converted in a linux env and uploaded into a cloud drive. The pdf file is then downloaded from the cloud.
image.png (37.3 KB)
and the result
image.png (115.9 KB)
To update on this, we have eliminate the security issue as a root cause because the save dialog is still showing even we managed to remove the security setting.
this dialog pops up when closing the pdf file with nothing changed.
image.png (51.3 KB)
this are the code we have tried
image.png (44.4 KB)
Initially you cannot convert a Word file into PDF using Aspose.PDF. You must use Aspose.Words for that purpose. Furthermore, are you saying now that you are able to bypass the issue now and things have started working?
The issue is the pdf “enable feature” popup is appearing even with bypassing the security setting so there is nothing to do with any security issue (ignore the security part).
Why is this showing ? The security group is correct for that file.
image.png (7.3 KB)
We are trying to generate the pdf file without the enable feature popup, meaning the “feature” should already be enabled when opening the file to prevent the save dialog from showing when closing the file.
We need some clarifications from your end before moving forward. As shared earlier, the Word to PDF Conversion can only be carried out using Aspose.Words. So are you facing this issue with the file generated by Aspose.Words? OR you are performing some additional operations on PDF using Aspose.PDF API and then saving the final document and this document is raising such warnings and alerts related to security?
It is nice to know that you were able to figure your issue out and things have started working at your side. Please feel free create a new topic in case you need any kind of assistance.