PDF Digital Signature in PowerBuilder

In short, the only thing that interests us are the two of_sign methods of the nvo_pdfservice class that allow us to digitally sign the pdf. The difference between both methods is that one uses an image to sign visually and the other does not.
The visual signature could be previously captured with a digital tablet, but I have not developed that in this example.
So that the example can be tested, I have added a test digital certificate called firma.pfx.
Attached PowerBuilder project and SnapDevelop projects of the C# libraries.
This message has an attachment file.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.

Sorry, but I'm not very familiar with certificates...
Please Log in or Create an account to join the conversation.

Hi, Your example work fine , Thank you! Here I have a resquest, Can you add function for get digital certificate from HSM or smartcard? I am not familiar with c#
Regards
Please Log in or Create an account to join the conversation.

Hi David,
In the Open event of the application object, you have the development path. I imagine you ran the program from the IDE, and the path is set to my development environment at the time:
ls_path="C:\project pw2021\Blog\pdfsignV\pdfsign.exe"
The condition above must also be consistent with the version of the IDE:
if right(UPPER(ls_path), 9)="PB210.EXE" then ---> This is for pb2021
I leave here attached the same example migrated to pb2022 3356 since to see it I had to increase the version.
By the way, I'll put the development path in the ini file so that it's more intuitive to change it:
ls_path = trim(ProfileString(".\pdfsign.ini", "INICIO", "DevelopmentPath", "C:\projecto pw2021\Blog\pdfsignV"))
And I'll update the condition mentioned before to pb2022:
if right(UPPER(ls_path), 7)="220.EXE" or right(UPPER(ls_path), 7)="X64.EXE" then
Regards... Ramón
This message has an attachment file.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.