Commit 39df18ac authored by Volker Krause's avatar Volker Krause
Browse files

Ignore broken Amadeus PDF document times

Those are always a constant value in 2011, which messes up e.g. boarding
pass extraction that depends on a vaguely realistic context date.
parent 14dfe5c7
Pipeline #233795 passed with stage
in 3 minutes and 29 seconds
......@@ -36,6 +36,11 @@ bool PdfDocumentProcessor::canHandleData(const QByteArray &encodedData, QStringV
static void applyContextDateTime(PdfDocument *pdf, ExtractorDocumentNode &node)
{
// ignore broken PDF times for Amadeus documents
if (pdf->producer() == QLatin1String("Amadeus") && pdf->creationTime() == pdf->modificationTime() && pdf->creationTime().date() == QDate(2011, 5, 10)) {
return;
}
auto dt = pdf->modificationTime();
if (!dt.isValid()) {
dt = pdf->creationTime();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment