PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfInfo.h
1// SPDX-FileCopyrightText: 2006 Dominik Seichter <domseichter@web.de>
2// SPDX-FileCopyrightText: 2020 Francesco Pretto <ceztko@gmail.com>
3// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
4
5#ifndef PDF_INFO_H
6#define PDF_INFO_H
7
8#include "PdfName.h"
9#include "PdfDate.h"
10#include "PdfElement.h"
11
12namespace PoDoFo
13{
17class PODOFO_API PdfInfo final : public PdfDictionaryElement
18{
19 friend class PdfDocument;
20private:
25
32public:
33
34 static bool TryCreateFromObject(const PdfObject& obj, std::unique_ptr<const PdfInfo>& info);
35 static bool TryCreateFromObject(PdfObject& obj, std::unique_ptr<PdfInfo>& info);
36
39 void SetTitle(nullable<const PdfString&> title);
40
43 nullable<const PdfString&> GetTitle() const;
44
47 void SetAuthor(nullable<const PdfString&> author);
48
51 nullable<const PdfString&> GetAuthor() const;
52
55 void SetSubject(nullable<const PdfString&> subject);
56
59 nullable<const PdfString&> GetSubject() const;
60
63 void SetKeywords(nullable<const PdfString&> keywords);
64
67 nullable<const PdfString&> GetKeywords() const;
68
72 void SetCreator(nullable<const PdfString&> creator);
73
76 nullable<const PdfString&> GetCreator() const;
77
80 void SetProducer(nullable<const PdfString&> producer);
81
84 nullable<const PdfString&> GetProducer() const;
85
86 void SetCreationDate(nullable<PdfDate> date);
87
90 nullable<PdfDate> GetCreationDate() const;
91
92 void SetModDate(nullable<PdfDate> date);
93
96 nullable<PdfDate> GetModDate() const;
97
100 void SetTrapped(nullable<const PdfName&> trapped);
101
104 nullable<const PdfName&> GetTrapped() const;
105
106private:
110 void init(PdfInfoInitial initial);
111
115 nullable<const PdfString&> getStringFromInfoDict(const std::string_view& name) const;
116};
117
118};
119
120#endif // PDF_INFO_H
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:108
This class provides access to the documents info dictionary, which provides information about the PDF...
Definition PdfInfo.h:18
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfInfoInitial
Enum to specify the initial information of the info dictionary.
Definition PdfDeclarations.h:389