5 Replies Latest reply on May 25, 2016 1:36 PM by peted44177588

    PDFA Complaince and convert existing PDF files to be PDFA compleint

    Manulak_Tech

      Hi All

       

      I am creating a PDF which is supposed to be complaint with PDF/A1-b and when I use online validators like PDF TOOLS Online Validator, it gives the following error saying that the PDF is not PDF/A complaint.

       

      dc:description/*[0] :: Missing language qualifier.

      dc:title/*[0] :: Missing language qualifier.

      The property 'pdf:keywords' is not defined in schema 'Adobe PDF Schema'.

      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'.

      The required XMP property 'pdf:Keywords' for the document information entry 'Keywords' is missing.

       

      I am using FOP for rendering my PDF and using iText (iText 2.1.6 by 1T3XT) for converting the PDF to be PDF/A complaint.

       

      public void convertToPdfA(File file1, File file2)

      {

      PdfReader reader = null;

      Document document = null;

      PdfCopy copy;

       

             InputStream PROFILE = this.getClass().getClassLoader().getResourceAsStream("com/ini/vldt/config/sRGB Color Space Profile.icm");

       

      There I first read the PDF file to a PdfReader object, then get a copy as follows.

               

      reader = new PdfReader(new RandomAccessFileOrArray(file1.getPath()),null);           

                    //Creating a new document that has the existing page size

                    document = new Document(reader.getPageSizeWithRotation(1));

                    //save the data in the 'document' to file2

                    copy = new PdfCopy(document, new FileOutputStream(file2));

       

      Then I try adding the Title, Author, Keywords, Creator, Subject, Creation Date and Producer as follows.

               

      try{               

           document.addTitle(reader.getInfo().get("Title").toString());

      }

      catch(Exception e){

           document.addTitle("TEST Title");

      }

                 

      try{

           document.addAuthor(reader.getInfo().get("Author").toString());               

      }

      catch(Exception e){

           document.addAuthor("TEST Author");               

      }

       

      try{

           document.addKeywords(reader.getInfo().get("Keywords").toString());

      }

      catch(Exception e){

           document.addKeywords("TEST Keywords");

      }

       

           document.addCreator("TEST Creator");

           document.addCreationDate();

           document.addProducer();           

       

      try{

           document.addSubject(reader.getInfo().get("Subject").toString());

             }

      catch(Exception e){

           document.addSubject("TEST Subject");

      }

       

       

      Then I give the PDFA conformance values and then create the PDF as follows.

       

      copy.setPDFXConformance(PdfCopy.PDFA1B);         

      copy.setPdfVersion(PdfCopy.VERSION_1_4);

      document.open();

      ICC_Profile icc = ICC_Profile.getInstance(PROFILE);

      copy.setOutputIntents("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", icc);

       

       

      for(int i=1;i<=reader.getNumberOfPages();i++){

      document.setPageSize(reader.getPageSizeWithRotation(i));

      copy.addPage(copy.getImportedPage(reader, i));

       

      }

      copy.createXmpMetadata();                     

      copy.close();

      document.close();

      reader.close();

       

       

       

      I got another error report from SolidFrameowrk validations as follows.

       

      - <metadata>

      <problem severity="error" objectID="27" clause="6.7" standard="pdfa">Language qualifier missing for property 'dc:description'</problem>

      <problem severity="error" objectID="27" clause="6.7" standard="pdfa">Language qualifier missing for property 'dc:title'</problem>

      <problem severity="error" objectID="27" clause="TN0003" standard="pdfa">Property 'pdf:keywords' shall use a custom embedded schema</problem>

      <problem severity="error" objectID="27" clause="6.7.3" standard="pdfa">Document information entry 'Keywords' not synchronized with metadata property 'pdf:Keywords'</problem>

      </metadata>

      - <fonts>

      <problem severity="error" objectID="12" clause="6.3.5" standard="pdfa">Missing or incorrect CIDSet for CIDFont subset</problem>

      <problem severity="error" objectID="18" clause="6.3.5" standard="pdfa">Missing or incorrect CIDSet for CIDFont subset</problem>

      </fonts>

       

      What can be the issue? Any reply is highly appreciated. Does this issue related to this location at Adobe?

       

      Thank  you.

      -Manulak Dissanayake