Hi Team,
I am using GroupDocs.Metadata in .NET to check whether a PDF is in PDF/A format.
Currently, I am reading XMP metadata using PdfRootPackage and checking for “pdfaid” (pdfaid:part and pdfaid:conformance). However, this approach is not working correctly in all cases — some PDF/A files are not detected.
Could you please confirm:
- Is there any reliable way in GroupDocs to identify PDF/A documents?
- Or is checking XMP metadata the only supported method?
Hi @sanket8753 !
Thank you for your request.
We took a little pause to verify and implement a more convenient way to detect these types.
At this moment, your findings are absolutely correct. Still, the changes we made for the upcoming release include the definition of the specific PDF format and a Boolean flag for the specific Pdf/A compliance detection. The following code demonstrates them
using (Metadata metadata = new Metadata(Constants.InputPdf))
{
var root = metadata.GetRootPackage<PdfRootPackage>();
if (root.FileType.IsPdfA)
{
Console.WriteLine("PDF/A version: {0}", root.FileType.PdfFormat);
}
else
{
Console.WriteLine("The document is not PDF/A compliant.");
}
}
Meantime, can you please share a few of your Pdf/A documents if possible so we can double-check our current implementation detects them as well.
We will keep you posted once the release is published.
Thank you!
doc_format_ole_attach.pdf (1.1 MB)
XLS_Format_OLE.pdf (210.6 KB)
these are pdf which is i converted using group docs in PDFA_3A format you can take a look of that
also i open one more topic regarding to “Issue with Extracting Attachments and PDF Conversion” can you also take a look of that.
Hi @sanket8753 !
Thank you for the update!
The provided files are both defined as PDF/A-1b, but you mentioned that you are expecting them to be in the format PDF/A-3a.
Is it a correct assumption?
If this is true, can you please provide the original files and source code on how you are trying to convert files to the expected PDF/A-3a?
We will be glad to fix it if there’s an issue.
Thank you!