Hi,

We have found a minor issue with iText 2.1.7 but it may be also applied to
version 5.

After trying to validate PDF/A documents with Callas software the following
messages are displayed.

The command and the output are:

./pdfaPilot --noprogress -a -l=1a /tmp/test.pdf

Input   /tmp/test.pdf
Hit     PDFA    Structured PDF: Type entry missing
Hit     PDFA    Structured PDF: Type entry in a structure element not
"StructElem"

Summary 2       Errors
[...]

Looking at ISO 19005-1:2005 spec, chapter "6.8.3.3 Structure hierarchy":
[...]
"Each structure element dictionary in the structure hierarchy shall have a
Type entry with the name value of
StructElem."
[...]

It can be easily fixed adding two lines to PdfStructureElement.java:

    public PdfStructureElement(PdfStructureElement parent, PdfName
structureType) {
        top = parent.top;
        init(parent, structureType);
        this.parent = parent;
        put(PdfName.P, parent.reference);
        //NEW LINE ADDED
        put(PdfName.TYPE,new PdfName("StructElem"));
    }

....

    public PdfStructureElement(PdfStructureTreeRoot parent, PdfName
structureType) {
        top = parent;
        init(parent, structureType);
        put(PdfName.P, parent.getReference());
        //NEW LINE ADDED
        put(PdfName.TYPE,new PdfName("StructElem"));
    }

Hope this helps
Jose
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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