Home | History | Annotate | Download | only in fpdfsdk
      1 // 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 
     10 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
     11 FPDFCatalog_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 }
     23