Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread madmax
Hi Michael and Andreas, I tried several things: 1) removed the date stamps from both the itext and CAPICOM 2) Also changed the bDetached parameter value to "false" as suggested by Michael in the javascript 3) I also noticed that I could avoid getting the digest from the PDF and just created

[iText-questions] FontSelector.Process method drops none visible Unicode chars.

2012-02-08 Thread Vahid Nasiri
Hello, Suppose I have a string like: string txt = "1\u202B/\u202C2\u202B/\u202C3";   If I use FontSelector.Process method, all of the none visible characters of txt will be dropped, because those are not available in any fonts (font.BaseFont.CharExists is always false here), but I need them for som

Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread Andreas Kuehne
Hi Michael, thanks for your detailed analysis of this signature. I was lost as our verifier prodly states 'valid signature' while the reader marks unspecified problems. I'll go and add an additional check! @Max: Looks like there is light at the end of the tunnel! Most problems solved ... Greeti

Re: [iText-questions] SIGN A PDF WITH PADES ATTRIBUTES

2012-02-08 Thread Raffaele
Ciao PierCarlo, ho il tuo stesso problema, hai poi risolto?'? Grazie mille, Raffaele -- View this message in context: http://itext-general.2136553.n4.nabble.com/SIGN-A-PDF-WITH-PADES-ATTRIBUTES-tp3718992p4369928.html Sent from the iText - General mailing list archive at Nabble.com.

Re: [iText-questions] Informations regarding iText methods

2012-02-08 Thread Raffaele
mkl wrote > > Raffaele, > > Raffaele wrote >> i would to know whati is the "byte[] secondDigest" into the method >> GetEncodedPKCS7. > > Cf. the method getAuthenticatedAttributeSet(). Here you can see that this > is the value used for the MessageDigest signed attribute, ie.e the actual > hash o

Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread mkl
Max, madmax wrote > In the signPdf method the sample Java code has reduced the code to: > byte[] data= Base64.decodeBase64(digest.trim().getBytes()); The data you received like that and then inserted in the PDF definitively is a signature container. > signed version of the document with my PIV

Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread madmax
Hi Michael, Andreas As always thank you for your input. I am attaching the updated sample code with the Java class and JSP. As well as the original PDF and signed version of the document with my PIV card. In the signPdf method the sample Java code has reduced the code to: byte[] data= Base64.d

[iText-questions] Bug in PDFX1A2001?

2012-02-08 Thread Elias
Hello Folks, I'm using imagemagick to convert from RGB to CMYK and it is inserted a new pdf document with iText checking the PDFX1A2001 conformance, this is my code: IMOperation op = new IMOperation(); op.addImage(_pathIn); op.p_profile("*"); op.profile(DEFAULT_PATH_ICCRGBPROFILE); op.profile(DEF

Re: [iText-questions] Informations regarding iText methods

2012-02-08 Thread Raffaele
Ok Thanks, There is someone else can help me??? -- View this message in context: http://itext-general.2136553.n4.nabble.com/Informations-regarding-iText-methods-tp436p4369030.html Sent from the iText - General mailing list archive at Nabble.com. -

Re: [iText-questions] Informations regarding iText methods

2012-02-08 Thread mkl
Raffaele, Raffaele wrote > now if i want to add manually these signed attributes, can you explain or > give me an example for this task? As I don't use the PdfPKCS7 utility class myself (I'm predominantly working with a security library which is not publicly available), I don't have any samples a

Re: [iText-questions] Informations regarding iText methods

2012-02-08 Thread Raffaele
Thanks Michael, now if i want to add manually these signed attributes, can you explain or give me an example for this task? I ask this because if i call the method GetEncodedPKCS7 with the second digest, Adobe say that the file has been modified. What's wrong??? Thanks again. :) -- View this m

Re: [iText-questions] Informations regarding iText methods

2012-02-08 Thread mkl
Raffaele, Raffaele wrote > i would to know whati is the "byte[] secondDigest" into the method > GetEncodedPKCS7. Cf. the method getAuthenticatedAttributeSet(). Here you can see that this is the value used for the MessageDigest signed attribute, ie.e the actual hash of the signed byte ranges in th

[iText-questions] Informations regarding iText methods

2012-02-08 Thread Raffaele
Hi everybody, i would to know whati is the "byte[] secondDigest" into the method GetEncodedPKCS7. If you know, how is calculated and when. Thanks! Raffaele. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Informations-regarding-iText-methods-tp436p436.html

Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread mkl
Hhmmm, in the version of this posting I received via e-mail, the actual code lines are missing. Maybe it's a bad idea to use nabble's raw tags... therefore here without raw-tags... mkl wrote > > You used to do > > byte[] data = Base64.decodeBase64(digest.trim().getBytes()); >

Re: [iText-questions] Sign and PDF with SmartCard and web browser only

2012-02-08 Thread mkl
Max, madmax wrote > So are you saying that this might already be a signature? Yes, it might be. As you unfortunately seem a bit reluctant to send samples, I cannot tell for sure. > if so how do you tell itext to embed the signature directly without using > PdfPKCS7 You used to do As a first ste