Hello Support Team
We make use of the conversion method (of aspose.pdf version 24.7) that converts pdf to pdfa-2a. In order to be able to assure the customer that the converted pdf’s are in pdfa-2a, we have used the validation method of Aspose too.
Convertion and validation use:
try
{
temp_doc.Info.ModDate = DateTime.Now;
temp_doc.Convert(filename, settings.PdfSaveSettings.PdfFormat, ConvertErrorAction.None); //pdfFormat = PDF_A_2A
}
...
var valid_Message = "";
pdfIsValid = ValidatePDF(temp_doc, settings, filename);
if (pdfIsValid)
{
valid_Message = $" It is {settings.PdfSaveSettings.PdfFormat} valid.";
}
Validation method:
public static Boolean ValidatePDF(Document doc, AsposeSettings settings, string filename)
{
Logger.Debug("Start of ValidatePDF method.");
pdfIsValid = false;
pdfIsValid = doc.Validate(filename, settings.PdfSaveSettings.PdfFormat); //pdfFormat = PDF_A_2A
if (!pdfIsValid)
{
return false;
}
RunConvert.pdfAValid++;
Logger.Debug("End of ValidatePDF method.");
return true;
As a result, we can see in the log that only 176 of the 2010 documents are PDF/A-2A valid and the rest have only been converted.
image.png (120.0 KB)
As soon as we open the documents that are not PDF/A-2A valid, we see this message ‘This file claims compliance with the PDF/A standard and has been opened read-only to prevent modification.’ (see in the cloud link under ‘pdf-2a not valid → before and after converting).
image.png (25.8 KB)
I have also added examples of valid conversions in the cloud link (see ‘pdf-2a valid → before and after converting’ ).
We have also taken some non pdf/a-2a valid documents and analysed them with other tools and some of them are valid compared to aspose (see in the cloud link under ‘pdf-2a not valid → pdfa-2a valid with other tools than aspose’).
We have the following questions in this regard:
- We want to know why the majority is not PDF/A-2A valid.
- What exactly does it mean if Aspose Valid function does not consider it as PDF/A-2A valid but the document claims to be PDF/A? What would be the consequences for the customer?
- Are there other methods that we have not used in our code that would lead to better conversion or validation?
- How can we convert all PDF’s to a valid PDF/-2A so that the majority and not the minority is valid?
The sample application code is also available in the cloud link if needed.
Link to the mentioned examples: ImageWare-Nextcloud
pw: dnXSobKz
Thanks in advance for a quick reply