Can use PDFNet for PDF/A conversion and PDF/A validation?

Q: Can I use PDFNet SDK (http://www.pdftron.com/net) to convert to PDF/
A or validate existing PDF documents for PDF/A compliance?

Specifically, given a PDF/A compliant PDF document: Append a very
large XMP custom property (this could be over 100 kb) and generate the
new PDF/A compliant document with this new XMP property set.
-----
A: You can use PDFNet SDK v4.5 or higher (for now use
http://www.pdftron.com/zBDI-R3A4A-1-450/PDFNet.zip to download the
latest demo build) to convert existing PDF documents to PDF/A
compliant document. You can also embed XMP properties (of arbitrary
size) either prior to or after PDF/A conversion (for example, please
see http://groups.google.com/group/pdfnet-sdk/browse_thread/thread/f483a8f4684351b8/832b88ddd7c42a43).

The following sample illustrates how to perform PDF/A validation or
PDF/A conversion using PDFNet (v.4.5 or higher):

//-----------------------------------------------------------------------------------
// The sample illustrates how to use PDF/A related API-s.
//-----------------------------------------------------------------------------------

using System;
using pdftron;
using pdftron.SDF;
using pdftron.PDF;
using pdftron.PDF.PDFA;

namespace PDFATestCS
{
  class Class1
  {
    // Relative path to the folder containing test files.
    static string input_path = "../../../../TestFiles/";
    static string output_path = "../../../../TestFiles/Output/";

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
      PDFNet.Initialize();
      PDFNet.SetResourcesPath("../../../../../resources");
      PDFNet.SetColorManagement(true); // Required for PDFA validation.

      //-----------------------------------------------------------
      // Example 1: PDF/A Validation
      //-----------------------------------------------------------
      try
      {
        string filename = "newsletter.pdf";
        PDFACompliance pdf_a = new PDFACompliance(false, input_path
+filename, null, PDFACompliance.Conformance.e_Level1B, 10);
        PrintResults(pdf_a, filename);
        pdf_a.Dispose();
      }
      catch (pdftron.Common.PDFNetException e)
      {
        Console.WriteLine(e.Message);
      }

      //-----------------------------------------------------------
      // Example 2: PDF/A Conversion
      //-----------------------------------------------------------
      try
      {
        string filename = "fish.pdf";
        PDFACompliance pdf_a = new PDFACompliance(true, input_path
+filename, null, PDFACompliance.Conformance.e_Level1B, 10);
        filename = output_path + "pdfa.pdf";
        pdf_a.SaveAs(filename, true);
        pdf_a.Dispose();

        // Re-validate the document after the conversion...
        pdf_a = new PDFACompliance(false, filename, null,
PDFACompliance.Conformance.e_Level1B, 10);
        PrintResults(pdf_a, filename);
        pdf_a.Dispose();
      }
      catch (pdftron.Common.PDFNetException e)
      {
        Console.WriteLine(e.Message);
      }

      PDFNet.Terminate();
    }

    static void PrintResults(PDFACompliance pdf_a, String filename)
    {
      int err_cnt = pdf_a.GetErrorCount();
      if (err_cnt == 0)
      {
        Console.WriteLine("{0}: OK.\n", filename);
      }
      else
      {
        Console.WriteLine("{0} is NOT a valid PDFA.", filename);
        for (int i=0; i<err_cnt; ++i)
        {
          PDFACompliance.ErrorCode c = pdf_a.GetError(i);
          Console.WriteLine(" - e_PDFA{0}: {1}.",
            c, PDFACompliance.GetPDFAErrorMessage(c));

          if (true)
          {
            int num_refs = pdf_a.GetRefObjCount(c);
            if (num_refs > 0)
            {
              Console.Write(" Objects:");
              for (int j=0; j<num_refs; )
              {
                Console.Write("{0}", pdf_a.GetRefObj(c, j));
                if (++j!=num_refs) Console.Write(", ");
              }
              Console.WriteLine();
            }
          }
        }
        Console.WriteLine();
      }
    }
  }
}

Q: Just a quick question. I seem to be missing the obvious, but how do
we tell if the PDF/A conversion failed? There is no return code for
the conversion since it is a constructor, nor for SaveAs(). The error
collection appears to list all the changes that were made during
conversion, not errors... Do we need to run the output through the
validator to confirm the conversion was successful (ie. GetErrorCount
() == 0)?
------
A: You are right, PDF/A conversion was completely successful if
pdfa.GetErrorCount() is zero. Depending on errors that are encountered
during the conversion a user may possibly want to ignore some errors
and save the resulting file.

Q: Thanks for your response. Just to clarify, we are looking for two
things: a list of changes that were made during conversion for PDF/A
compliancy, and a list of any errors that occurred during conversion
that prevented the successful creation of PDF/A output. It sounds like
what we need to do is:

1. Run the conversion ("new PDFACompliance(true, ...") on the original
input, then loop through the error collection to obtain the list of
changes made.
2. Run the validation ("new PDFACompliance(false, ...") on the output
from step 1, and if GetErrorCount() is greater than zero, the PDF/A
conversion failed (loop through error collection to get details of
outstanding problems).
-------
A: You are correct. You can run PDF/A validation both before and after
the conversion in order to get an exact list of PDF/A corrections and
the remaining issues.