Two
PDF/A input files are merged using the PdfFileEditor.Append function, but the
resultant output file fails PDF/A Preflight compliance with the errors “Metadata
missing (XMP)” and “PDF/A entry missing”.
The
call to Document.Validate for the output file reports the following errors:
<Problem Severity="Error" Clause="6.7.3" Convertable="True">Document information entry 'CreationDate' not synchronized with metadata property 'xmp:CreateDate'</Problem>
<Problem Severity="Error" Clause="6.7.3" Convertable="True">Document information entry 'ModDate' not synchronized with metadata property 'xmp:ModifyDate'</Problem>
Attached
are the log and PDF/A files. The code
below was used to generate the validation log files and the output PDF/A file.
Document pdfDoc = null;
// Validate first PDF input file
String logInput1PDFile = Path.Combine(tempDir, Path.GetFileNameWithoutExtension(tempPDFFile) + "_input1.log");
pdfDoc = newDocument(outputFileName);
pdfDoc.Validate(logInput1PDFile, PdfFormat.PDF_A_1A);
// Validate second PDF input file
String logInput2PDFile = Path.Combine(tempDir, Path.GetFileNameWithoutExtension(tempPDFFile) + "_input2.log");
pdfDoc = newDocument(tempPDFFile);
pdfDoc.Validate(logInput2PDFile, PdfFormat.PDF_A_1A);
// First + second => output file
String tempAppendPDFile = Path.Combine(tempDir, Path.GetFileNameWithoutExtension(tempPDFFile) + "_append" + outputFileNameExt);
PdfFileEditor pdfFileEditor = newPdfFileEditor();
pdfFileEditor.Append(outputFileName, tempPDFFile, 1, pageCount, tempAppendPDFile);
// Validate PDF append file
String logAppendPDFile = Path.Combine(tempDir, Path.GetFileNameWithoutExtension(tempPDFFile) + "_append.log");
pdfDoc = newDocument(tempAppendPDFile);
pdfDoc.Validate(logAppendPDFile, PdfFormat.PDF_A_1A);