How to digitally sign a PDF in C #?

5

I need to digitally sign a PDF previously created.

This PDF is being created through a Web Service that uses Office Interop to generate the from an Office Template.

I already have access to the ICP Brasil Certificate , it was purchased through SERASA or SERPRO) but I can not find a reference how to do it this without having to abandon all the existing PDF creation routine.

Posts I checked but could not adapt myself:

In short, you already have PDF generation generation routine, I just want to subscribe. Anyone have any tips? I have no experience with this piece of information security.

[Edited]

Ideally, you should not have to use a paid library since you are using Office (paid) to generate PDF . I have access to the PDF generator source if the change has to be there.

    
asked by anonymous 12.12.2016 / 11:24

1 answer

2

For this purpose you can use ItextPdf . In this link you will find an example of how to sign and verify the signature of a PDF . This is an example with Itextsharp

    
22.12.2016 / 14:44