COSDictionary last = null;
COSDocument cd = null;
try {
cd = new COSDocument();
PdfElementParser parser1 = new PdfElementParser(cd, firstTrailer.getBytes());
first = parser1.parseAsDictionary();
PdfElementParser parser2 = new PdfElementParser(cd, lastTrailer.getBytes());
last = parser2.parseAsDictionary();
checkMainTrailer(pdfDoc.getDocument(), first, result);
if (!compareIds(first, last, pdfDoc.getDocument())) {
result.add(new ValidationResult.ValidationError(
ValidationConstants.ERROR_SYNTAX_TRAILER_ID_CONSISTENCY,