From bc0bc27b722c7c7fa4c8e416fe5175a4a5bbb748 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Thu, 9 Jul 2020 16:27:21 +0200 Subject: [PATCH] Bugfix: Some PDFs use bool for trapping --- PdfForQtLib/sources/pdfdocument.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PdfForQtLib/sources/pdfdocument.cpp b/PdfForQtLib/sources/pdfdocument.cpp index 4aa7220..bdabb05 100644 --- a/PdfForQtLib/sources/pdfdocument.cpp +++ b/PdfForQtLib/sources/pdfdocument.cpp @@ -187,6 +187,10 @@ void PDFDocument::initInfo() throw PDFException(tr("Bad format of document info entry in trailer dictionary. Trapping information expected")); } } + else if (nameObject.isBool()) + { + m_info.trapped = nameObject.getBool() ? Info::Trapped::True : Info::Trapped::False; + } else { throw PDFException(tr("Bad format of document info entry in trailer dictionary. Trapping information expected"));