I am using O2S.Components.PDF4NET version 5.0.3.0 but certain PDF (which I found to be non PDF/A compliant) hangs the code forever at line PDFDocument doc = new PDFDocument(ms);
public static PDFDocument NewLicensedPDFDocument(Stream ms)
{
PDFDocument doc = new PDFDocument(ms);
doc.SerialNumber = "XXXX-YYYY-ZZZZ-AAAA";;
return doc;
}
PDF file opens easily on Adobe Acrobat Reader but fails validation on online PDF/A validator (https://www.pdf2go.com/validate-pdfa).
Error which online validator shows are

What could be the reason?