diff --git a/Pdf4QtLibCore/sources/pdfannotation.cpp b/Pdf4QtLibCore/sources/pdfannotation.cpp index 8034779..0cfb66f 100644 --- a/Pdf4QtLibCore/sources/pdfannotation.cpp +++ b/Pdf4QtLibCore/sources/pdfannotation.cpp @@ -924,6 +924,11 @@ PDFAnnotationPtr PDFAnnotation::parse(const PDFObjectStorage* storage, PDFObject annotation->m_content = PDFRichMediaContent::parse(storage, dictionary->get("RichMediaContent")); annotation->m_settings = PDFRichMediaSettings::parse(storage, dictionary->get("RichMediaSettings")); } + else + { + // Fill unknown annotation + result.reset(new PDFUnknownAnnotation()); + } if (!result) { diff --git a/Pdf4QtLibCore/sources/pdfannotation.h b/Pdf4QtLibCore/sources/pdfannotation.h index 8e58568..1391089 100644 --- a/Pdf4QtLibCore/sources/pdfannotation.h +++ b/Pdf4QtLibCore/sources/pdfannotation.h @@ -84,7 +84,8 @@ enum class AnnotationType Redact, Projection, _3D, - RichMedia + RichMedia, + Unknown }; enum class AnnotationLineEnding @@ -1317,6 +1318,15 @@ public: virtual AnnotationType getType() const override { return AnnotationType::TrapNet; } }; +/// Unknown (not recognized) annotation. +class PDFUnknownAnnotation : public PDFAnnotation +{ +public: + inline explicit PDFUnknownAnnotation() = default; + + virtual AnnotationType getType() const override { return AnnotationType::Unknown; } +}; + /// Watermark annotation represents watermark displayed on the page, /// for example, if it is printed. Watermarks are displayed at fixed /// position and size on the page. diff --git a/RELEASES.txt b/RELEASES.txt index 2f53ea5..a4e1d4f 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -1,4 +1,5 @@ CURRENT: + - Issue #168: When opening a PDF file or merging some PDF files, stamp will disappear. - Issue #164: Taskbar icon not shown in linux mint. - Issue #163: Unable to render probably valid PDF - Issue #161: Can it be possible to trust a certificate like in acrobat?