PDF/A Verification

I am creating an application that takes an existing PDF, verifies if it is a PDF/A, and if not, it converts it from a PDF to a PDF/A. After it converts, I call the verification code one more time to ensure the conversion was successful. I’m hitting a PDF where it’s not a PDF/A, so I convert it. But when I run the verification after it’s complete, it returns the following error from PDFACompliance.GetPDFAErrorMessage:

tintTransform is different in Separations with the same colorant name

Because the GetErrorCount() is 1, my verification fails, though if I open the document in Acrobat, it does look like a PDF/A. Can you please explain what that error means, whether or not I should hard-code my verification to ignore that error, and whether there are other errors that I should also ignore when it comes to verifying if the document is a PDF/A?

Here is my code:

private static bool ConvertToPdfA(ref Document document)
{
try
{
using var pdfCompliance = new PDFACompliance(true, document.OutputFile, null, PDFACompliance.Conformance.e_Level2B, null, 10, false);
var tempOutput = document.OutputFile + “.tmp”;
pdfCompliance.SaveAs(tempOutput, false);
if (!IsPdfA(tempOutput))
throw new Exception(“Failed to convert to PDF/A”);
pdfCompliance.Dispose();
File.Delete(document.OutputFile);
File.Move(tempOutput,document.OutputFile);
return true;
}
catch (Exception e)
{
document.ErrorMessage = e.Message;
return false;
}
}

private static bool IsPdfA(string inputFile)
{
try
{
using var pdfCompliance = new PDFACompliance(false, inputFile, null, PDFACompliance.Conformance.e_Level2B, null, 10, false);
return pdfCompliance.GetErrorCount() == 0;
}
catch (Exception)
{
return false;
}
}

Hello Bryan,

Thank you for contacting us about this. The error is likely a result of the Separations within the document.

Multiple separations (you can think of separations like printer inks) that produce different results during rendering, but have the same name might lead to inconsistencies in rendering and definitely could confuse users viewing the separations. (For example in https://www.pdftron.com/samples/web/samples/pdf-manipulation/color-separation/)

As for whether this issue is important, it depends to some degree on where/whether the different separations are used. We would require additional information (like the file) in order for us to investigate on our end.

Regarding other errors that you may encounter and their relevance, at this time, we currently have no mechanism to report the importance of particular errors. However, this is something we might be looking into developing in a future release.

Please let me know if you have any further questions.