[PDF/A] New PDF/A Validator

Example requests & Code samples for GdPicture Toolkits.
Post Reply
Elodie
Posts: 37
Joined: Fri Sep 03, 2010 10:50 am

[PDF/A] New PDF/A Validator

Post by Elodie » Fri Nov 13, 2020 10:46 am

Hello!

We have released a PDF/A validator to check the ISO compliance of your files:
https://www.gdpicture.com/blog/new-pdfa-validator/

Here is an example on how to validate PDF/A-2b conformance(C#):

Code: Select all

using (GdPicturePDF oGdPicturePDF = new GdPicturePDF())
{
    string caption = "Example: ValidatePDFA";
    GdPictureStatus status = oGdPicturePDF.LoadFromFile("test.pdf", false);
    if (status == GdPictureStatus.OK)
    {
        bool ConformsToRequestedStandard = false;
        string XMLReport = string.Empty;
        status = oGdPicturePDF.ValidatePDFA(PdfValidationConformance.PDF_A_2b, ref ConformsToRequestedStandard, ref XMLReport);
        if (status == GdPictureStatus.OK)
        {
            if(ConformsToRequestedStandard)
            {
                MessageBox.Show("The PDF document does conform to the PDF/A-2b standard.", caption);
            }
            else
            {
                MessageBox.Show("The PDF document does not conform to the PDF/A-2b standard. Refer to the XML Report for further details.", caption);
            }
        }
        else
        {
            MessageBox.Show("Error occured durring the document validation process. Status: " + status.ToString(), caption);
        }
    }
    else
    {
        MessageBox.Show("The file can't be loaded. Status: " + status.ToString(), caption);
    }
}
You will find the full documentation here:
https://www.gdpicture.com/guides/gdpicture/Gd ... ePDFA.html

Regards,

Elodie

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests