Hi,

I've found some error in itextsharp sample: "How to sign with a smartcard using 
an external signature dictionary with iTextSharp and .NET 2.0".
The sample is at http://itextpdf.sourceforge.net/howtosign.html "How to sign a 
PDF using iText and iTextSharp"-

I've found many error about objects and versions. Meanwhile I could solve 
almost issues.
So, I left here my code changes.
It's is working with VisualStudio 2005 and .Net 20.
I've merged this sample with iTextSharpSign from alaa-edine ()


Issues solved:

- In VS project references you need to add a new reference "system.security".
- In Code, it need to change some items:

using System.Security.Permissions; //to complete the reference reference :)


// "Org.BoucyCastle.X509" must be transformed in  "org.bouncycastle.x509"
            X509Certificate2 card = GetCertificate();

//changes in these two lines
            org.bouncycastle.x509.X509CertificateParser cp = new 
org.bouncycastle.x509.X509CertificateParser(card.RawData);
            org.bouncycastle.x509.X509Certificate[] chain = new 
org.bouncycastle.x509.X509Certificate[] { cp.ReadCertificate()};


// needed to disable render.
//    sap.Render = PdfSignatureAppearance.SignatureRender.NameAndDescription;



Ok, That is working. 
Some one could explain why render doesn't work.


Cumprimentos,
 
Fernando Pinto

DMSI - Direcção Municipal de Sistemas de Informação
Câmara Municipal do Porto
Rua Guilherme da Costa Carvalho, 38 4.º
4000-274 Porto
Ext. 3192
Tel. 222 097 000
Fax 222 097 100

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to