Digital sign of PDF with PAdES standard - c#

I need to sign a pdf document with PADES standard.
I'm programming with c#.
Somebody can suggest something ?
Best regards
Piercarlo

You can try iText. Although I still haven't tried myself, it supports signing files using the PAdES standard. Here's a sample, and here's another.
Mind you, the latest version is dual licensed, Affero-GPL or a Commercial license. But there's an older version under the LGPL.

Did you check PDFBlackbox package of our SecureBlackbox product? It supports PAdES and the sample for C# is included right in the installation package.

I know it is an old question, but here we go.
iTextSharp is what are you looking for. It is the ported version of iText to C#, and as Filipe Correia answered, it have support to PADES.
The PADES standard have 5 parts.
iText (Java) and iTextSharp (C#), both :
Have full support of PAdES Part 2
Support of PAdES Part 3 with an external signature
Have full support of PAdES Part 4
And do not support PAdES Part 5.
This document could help : http://lowagie.com/img/summit2012/pades.pdf
If someone want more details about PADES, could look here : http://www.etsi.org/deliver/etsi_ts/102700_102799/10277801/01.01.01_60/ts_10277801v010101p.pdf

Related

.NET Core PDF and RTF document generation

Looking for suggestions for libraries that can generate PDF and RTF documents from stored data (not "HTML to PDF" or "URL to PDF"). With all functionality for adding images, encryption etc. We are currently looking for an alternative to PDFSharp-MigraDoc-GDI, which, although works with .NET Core, does not fully support it and we see compiler warnings - "This package may not be compatible with your project". We have also been getting issues on the IIS tier regarding GDI+. We've decided to play it safe and find an alternative. Does anyone have a solution that they would recommend? Thanks
As far as I know, you can write whole new documents using the Microsoft.Office.Interop library, here is this post that's talk about it (be careful about deploying things like these, you might need an office instalation running on the server):
https://www.c-sharpcorner.com/UploadFile/muralidharan.d/how-to-create-word-document-using-C-Sharp/
And I've found this post about using the library to print PDFs:
How do I convert Word files to PDF programmatically?
It's not much but hope that it helps, regards!

Generate a PDF document using .NET Standard 2.0

I am trying to find a way how to generate a custom PDF document from .NET Standard 2.0. Free or Open-Source library would be of the preference in this case.
I Have already tried PDFSharp, but it does not support .NET Standard 2.0 (or am I wrong here?) and several ports of this library, which all claim to be .NET Standard, do not have the System.Drawing.Common which is necessary to actually write anything to the document.
Does anyone have any suggestion on how could I generate a PDF with my above-mentioned criteria? It does not really matter if I would have to first write HTML and then convert it to PDF or per se convert excel type to PDF. Anything that could give me a PDF would be great.

Signing documents with iText 7 and GlobalSign DSS in .NET C#

We are trying to create a document signing solution with iText (v7) and GlobalSign DSS.
Does anybody have experience with this? I can't find a lot (if any) examples on this. How is one supposed to combine the API requests ("identity", "certificate_path", "timestamp", "identity/.../sign",...) with iText?
I have found some sample code, but it is in Java and uses an old version of iText (with the PdfStamper).
The goal is to create LTV enabled signatures (including a visible seal), with the server certificate stored at GlobalSign's HSM.
Many thanks for any help and/or sympathy!
https://github.com/SimonChris/SigningServer
I have published an open-source implementation above. The license is AGPL, as required by iText7, but you can run the program on its own server and have your main application send PDF data for signing through the REST API.
You can find the guide for both c# and Java on
https://kb.itextpdf.com/home/it7kb/examples/how-to-use-a-digital-signing-service-dss-such-as-globalsign-with-itext-7

Best .Net pdf library to generate data tables

I am looking around for a good free .Net pdf library, in particular to generate data in tables easily and flexibly. I have seen iTextSharp but this requires a license from what I've read. There is also PDFSharp which looks promising using MigraDoc for table generation. Is there anything else anyone recommends?
Thanks in advance.
ItextSharp 4 released under the GNU Lesser General Public License (LGPL)
by using version 4 or earlier you can use without having to buy a license.
For version 4 heres the link, download the code and in bin folder you will get ITextsharp old version dll
itextsharp 4
Here the updated Itextsharp dll
Or you can also use client side PDF generation using Jspdf

Obsolete code for signing PDF with smartcard

I'm trying to sign a PDF file using itextsharp with a smartcard. The only example I could find on how to do that was from http://itextpdf.sourceforge.net/howtosign.html#signextitextsharp1
However, this example appears to be obsolete, it presents various compilation errors when used with the most recent version of iTextSharp: Methods that no longer exists, use of inappropriate classes etc.
Does anyone have an updated/working version of this code?
For information on how to sign using the current versions of iText and iTextSharp have a look at Digital Signatures for PDF documents, a White Paper by Bruno Lowagie (iText Software).
While the code samples are written in Java, the author is confident that the Java examples are also easy to understand for C# developers who are using iTextSharp instead of iText.
The C#-ified samples can be checked out from the iTextSharp SVN repository.

Categories

Resources