PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfFileSpec.h
1// SPDX-FileCopyrightText: 2006 Dominik Seichter <domseichter@web.de>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef PDF_FILE_SPEC_H
5#define PDF_FILE_SPEC_H
6
7#include "PdfDeclarations.h"
8
9#include "PdfElement.h"
10#include "PdfString.h"
11
12namespace PoDoFo {
13
14class PdfDocument;
15
19class PODOFO_API PdfFileSpec final : public PdfDictionaryElement
20{
21 friend class PdfDocument;
22 friend class PdfAnnotationFileAttachment;
23 friend class PdfNameTreeBase;
24
25private:
27
29
30 PdfFileSpec(const PdfFileSpec& fileSpec) = default;
31
32public:
33 bool TryCreateFromObject(PdfObject& obj, std::unique_ptr<PdfFileSpec>& filespec);
34
37 nullable<const PdfString&> GetFilename() const;
38
39 void SetFilename(nullable<const PdfString&> filename);
40
41 void SetEmbeddedData(nullable<const charbuff&> data);
42
43 void SetEmbeddedDataFromFile(const std::string_view& filepath);
44
45 nullable<charbuff> GetEmbeddedData() const;
46
47private:
48 void setData(InputStream& stream, size_t size);
49};
50
51};
52
53#endif // PDF_FILE_SPEC_H
54
This file should be included as the FIRST file in every header of PoDoFo lib.
An interface for reading blocks of data from a data source.
Definition InputStream.h:17
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:108
A file specification is used in the PDF file to refer to another file.
Definition PdfFileSpec.h:20
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