Notifications
Announcements
No record found.
Basically, I've to encrypt the pdf file before sending it through email via D365 Finance & Operation. I've written the code but it could not help to encrypt the pdf file.
Could anyone know what is the issue in this why should that code not encrypt the file?
If I understand it correctly, your question is about PdfSharp library and not F&O, therefore this isn't an ideal forum.
Anyway, please tell us more about your problem. The description "it could not help to encrypt the pdf file" is pretty vague.
Isn't the problem in the fact that you opened the document for only for reading?
Can we implement a password in PDF through x++?
After receiving the PDF it should ask for a password.
Yes, PdfSharp library supports it and .NET Interop from X++ allows you to use it from X++, as you already know, because you're doing that above.
I import the c# project and build the project after build the project it generates the DLL file after that I Place the DLL in the bin directory of the custom model and add the reference of PDF sharp Library and write the code as I mentioned above but it did not work to encrypt the PDF file .
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader