If you want a specific feature which is not avaliable now to be supported by our product, please post it here. We’ll seriously consider adding it as a new feature in our future upgrades.

Wed Mar 10, 2021 12:08 pm

Hi

I need to be able to encrypt a PDF with a password.
This works as expected.

However, I need the XMP meta data to not be encrypted.
For example, in PDF-XChange Editor I can apply a passwort but define that the meta data should not be encrypted (see attachment).

As I see it, this is currently not possible wit Spire.PDF (for .Net or Android).

So, is it possible that you could add this feature?
And what would be an estimate when this would be available for .Net and for Android?

RicoScheller
 
Posts: 35
Joined: Tue Jul 02, 2019 10:34 am

Thu Mar 11, 2021 6:34 am

Hello,

Thanks for your post.

Yes, we do not yet support encrypting all PDF document contents except metadata. We will consider adding it as a new feature to our upgrade list.
But I am sorry that we cannot give you an estimated implementation time at this moment. Anyway, once there is any good news, we will let you know immediately. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Jul 21, 2023 3:25 am

Hi,

We hope this email finds you well.
Glad to inform you that we just released Spire.Pdf 9.7.14 hotfix, which has implemented the new feature SPIREPDF-4092, please see the following code for reference.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"in.pdf");           
PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy(userPassword, ownerPassword);
securityPolicy.EncryptMetadata = false;
doc.Encrypt(securityPolicy);
doc.SaveToFile(@"out.pdf");

You can download it from our website or install from Nuget.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget: https://www.nuget.org/packages/Spire.PDF/9.7.14

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Fri Jul 21, 2023 5:51 am

Hey, thank you very much, this is amazing to hear.

As we develop a Flutter app which should run on Windows and Android, we would need this feature also in Spire.PDF for Android via Java to be able to use it in our app.

So do you know if and when this is planned to arrive for Android?

RicoScheller
 
Posts: 35
Joined: Tue Jul 02, 2019 10:34 am

Fri Jul 21, 2023 6:43 am

Hi,

Thank you for your inquiry.

After discussing this matter with our developers, they will synchronize the new feature first to our Java platform and then proceed with syncing it to the Android platform. To ensure proper tracking and execution, I have created a task for the synchronization process with the ticket number SPIREPDF-6190.

Rest assured, once the feature is successfully synchronized to the Android product, we will promptly notify you.

If you have any further questions or concerns, please feel free to reach out to us. We are here to assist you and provide any additional information you may require.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Fri Oct 13, 2023 8:46 am

Hi,

Thanks for your patience.
Glad to inform you that the new feature has been synchronized to the Android platform. Please refer to the following code.

Do not encrypt metadata
Code: Select all
PdfDocument pdfdoc = new PdfDocument();
pdfdoc.loadFromFile(inputFile);
PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy("123", "e-iceblue");
securityPolicy.setEncryptionAlgorithm(PdfEncryptionAlgorithm.AES_128);
securityPolicy.setEncryptMetadata(false);
pdfdoc.encrypt(securityPolicy);
pdfdoc.saveToFile(outputFile);


encrypt metadata
Code: Select all
PdfDocument pdfdoc = new PdfDocument();
pdfdoc.loadFromFile(inputFile);
PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy("123", "e-iceblue");
securityPolicy.setEncryptMetadata(true);
pdfdoc.encrypt(securityPolicy);
pdfdoc.saveToFile(outputFile);

Website link: https://www.e-iceblue.com/Download/pdf-for-android-via-java.html

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to New Feature Requests