Hi,

I try to generate a PDF/A and check its conformance with a validation tool
: PDF Validator from PDF Tools.
I create a document, I add all informations to fill "document info" and
finally I call createXmpMetadata() method from writer.
The most simpliest method to generate XMP metadatas.

When validation time arrives, two errors appears :
- The XMP property 'dc:title' is not synchronized with the document
information entry 'Title'
- The XMP property 'dc:description' is not synchronized with the document
information entry 'Subject'

At first I use PDFReader to extract and check if there were some
differences between document info and XMP metadas.
But title and subject in document informations are the same to dc:title and
dc:description tag in XMP metadatas.
To be sure, I've even decided to browse the generated PDF source with a
third external application : JPedal which give me the same information.

Then, I tried an other PDF validator, Intarsys online PDF/A validator (
http://www.intarsys.de/pdfa-check) which rejects the file generated by
IText like PDF Validator did.

At the end, I removed title and subject from document info (by removing
addTitle and addSubject call in my code) and I check the PDF generated
which has become valid for both validators.

Is this issue known?


*Code :*

        Document document = new Document();

        PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream(filePath));
        writer.setPdfVersion(PdfWriter.PDF_VERSION_1_4);
        writer.setTagged();
        writer.setPDFXConformance(PdfWriter.PDFA1A);

        document.open();
        document.addAuthor("Me");
        document.addTitle("A nice title");
        document.addSubject("A very important subject");
        document.addKeywords("Test File");
        document.addCreator("Creator ©");
        document.addProducer();
        document.addCreationDate();

        writer.createXmpMetadata();

        Font font =
FontFactory.getFont("/usr/share/fonts/truetype/msttcorefonts/verdana.ttf",
BaseFont.CP1252, BaseFont.EMBEDDED);
        ICC_Profile icc = ICC_Profile.getInstance(new
FileInputStream("/usr/share/color/icc/sRGB.icc"));
        writer.setOutputIntents("Custom", "", "http://www.color.org";, "sRGB
IEC61966-2.1", icc);

        document.add(new Paragraph("PDF/A-1a file test", font));
        for (int i = 1; i < 101; i++) {
            document.add(new Paragraph("A sentence on line  " + i, font));
        }
        document.close();
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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