Hi  Michele

Try adding:

                writer.getExtraCatalog().put(PdfName.LANG, new
PdfString("es"));

Just change "es" for your language.

Hope this helps
Jose


2011/4/20 BigBrus <michele.brus...@gmail.com>

> Hi everybody,
>
> I have to create a pdf with the standard PDF/A-1A, and i used iText. The
> creation is quite simple, there are lots of methods to do this correctly.
>
> The problem is, when i use Adobe Acrobat X to verify the conformance to the
> International Standards, the result is "NOT conformant". The problem is in
> 2
> fields of the XMP Metadata, precisely in the fields "definition" and
> "title"
> of the "dc" (Dublin Core Schema) section, where it seems to be missing the
> value "xml:lang: x-default" or something similar.
>
> After some trials, i found in the source code the method where this is
> missing:
>
> org.itextpdf.text.xml.xmp.XmpArray.toString()
>
> StringBuffer buf = new StringBuffer("<");
>                buf.append(type);
>                buf.append('>');
>                String s;
>                for (String string : this) {
>                        s = string;
>                        buf.append("<rdf:li>");
>                        buf.append(XmpSchema.escape(s));
>                        buf.append("</rdf:li>");
>                }
>                buf.append("&lt;/&quot;);
>                buf.append(type);
>                buf.append('&gt;');
>                return buf.toString();
>
> and i changed this with
>
> StringBuffer buf = new StringBuffer("<");
>                buf.append(type);
>                buf.append('>');
>                String s;
>                for (String string : this) {
>                        s = string;
>                        buf.append("<rdf:li <b>xml:lang=\"" +LangAlt.DEFAULT
> +"\">");
>                        buf.append(XmpSchema.escape(s));
>                        buf.append("</rdf:li>");
>                }
>                buf.append("&lt;/&quot;);
>                buf.append(type);
>                buf.append('&gt;');
>                return buf.toString();
>
> and it is working good, but this is a poor workaround, as adds this
> parameter to any field that use "rdf:li".
>
> Is there any better solution available? or is there already a solution in
> development for a next version of itext?
>
> Thanks everybody
>
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/iText-Creation-PDF-A-1A-tp3462676p3462676.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> 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
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
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