PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfCommon.h
1// SPDX-FileCopyrightText: 2022 Francesco Pretto <ceztko@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef PDF_COMMON_H
5
6#include "PdfDeclarations.h"
7
8namespace PoDoFo {
9
10using LogMessageCallback = std::function<void(PdfLogSeverity logSeverity, const std::string_view& msg)>;
11
12class PODOFO_API PdfCommon final
13{
14 PdfCommon() = delete;
15
16public:
17 static void AddFontDirectory(const std::string_view& path);
18
22 static void SetLogMessageCallback(const LogMessageCallback& logMessageCallback);
23
26 static void SetMaxLoggingSeverity(PdfLogSeverity logSeverity);
27
30 static PdfLogSeverity GetMaxLoggingSeverity();
31
32 // set maximum recursion depth (set to 0 to disable recursion check)
33 static void SetMaxRecursionDepth(unsigned maxRecursionDepth);
34
35 static unsigned GetMaxRecursionDepth();
36
38 static bool IsLoggingSeverityEnabled(PdfLogSeverity logSeverity);
39
40 static unsigned GetMaxObjectCount();
41 static void SetMaxObjectCount(unsigned maxObjectCount);
42};
43
44}
45
46#define PDF_COMMON_H
47
48#endif // PDF_COMMON_H
This file should be included as the FIRST file in every header of PoDoFo lib.
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfLogSeverity
Used in PoDoFo::LogMessage to specify the log level.
Definition PdfDeclarations.h:49