Hi,

I am trying to extract the subject name from a certificate of a signed PDF.
The certificate contains special characteres (ñ). 
At extraction, the certificateinfo.getsubjectFields returns the subject but
replaces the special character (ñ) by a "?" and cuts the output. (Subject:
{C=[ES], OU=[FNMT Clase 2 CA, 513170016], O=[FNMT], CN=[NOMBRE GUARDE?)

Is there a posibility to put the encoding to ISO-8859-1 at extraction of the
certificateinfo?

       PrintWriter out = new PrintWriter(new
FileOutputStream(VERIFICATION));
                PdfReader reader = new PdfReader("test.pdf");
        AcroFields af = reader.getAcroFields();
        ArrayList<String> names = af.getSignatureNames();
        for (String name : names) {
            out.println("Signature name: " + name);
            PdfPKCS7 pk = af.verifySignature(name);
            out.println("Subject: " +
CertificateInfo.getSubjectFields(pk.getSigningCertificate())); }

Regards,
Nicbbb




--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/itext-certificateinfo-encoding-problem-tp4658390.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to