Announcements
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?
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 .
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.
Can we implement a password in PDF through x++?
After receiving the PDF it should ask for a password.
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?
André Arnaud de Cal...
294,127
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator