blob: 493e5aea43f830fbad4ba3e4cf5e0cb938d42ebe [file] [log] [blame]
Henrique Nakashima077f6432017-10-16 13:32:01 -04001// Copyright 2017 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "public/fpdf_catalog.h"
6
7#include "core/fpdfapi/parser/cpdf_document.h"
8#include "fpdfsdk/fsdk_define.h"
9
10FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
11FPDFCatalog_IsTagged(FPDF_DOCUMENT document) {
12 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
13 if (!pDoc)
14 return false;
15
16 const CPDF_Dictionary* pCatalog = pDoc->GetRoot();
17 if (!pCatalog)
18 return false;
19
20 const CPDF_Dictionary* pMarkInfo = pCatalog->GetDictFor("MarkInfo");
21 return pMarkInfo && pMarkInfo->GetIntegerFor("Marked") != 0;
22}