Can you share sample code which can be used to exactly do this
I have referred multiple links. like below and also created sample (link below). Please help urgently.
Link I have referred so far:
https://stackoverflow.com/questions/47505696/itext-pdf-deferred-signing-results-in-pdf-with-invalid-signature
https://stackoverflow.com/questions/33019686/itext-signing-pdf-using-external-signature-with-smart-card
Based on all this idea I have created some code below. Not sure if my approach is correct. Please help.
I have uploaded my code at - https://1drv.ms/u/s!Al69FgQ8jwmZbgiBMXLLM4j5sbU?e=vyGF4m
The code contains sample PDFs also.

Bharat VasantRank #2,126 · 671 reputationPosted Sep 3, 2020, 3:40 PM EDT
Sapna GirishRank #1,811 · 819 reputationPosted Nov 11, 2019, 2:15 PM EST
Naman Shah5 reputationPosted Nov 11, 2019, 3:31 PM EST