PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
PdfFileSpec.h
1
6#ifndef PDF_FILE_SPEC_H
7#define PDF_FILE_SPEC_H
8
9#include "PdfDeclarations.h"
10
11#include "PdfElement.h"
12#include "PdfString.h"
13
14namespace PoDoFo {
15
16class PdfDocument;
17
23class PODOFO_API PdfFileSpec final : public PdfDictionaryElement
24{
25 friend class PdfDocument;
26 friend class PdfAnnotationFileAttachment;
27 friend class PdfNameTreeBase;
28
29private:
31
33
34 PdfFileSpec(const PdfFileSpec& fileSpec) = default;
35
36public:
37 bool TryCreateFromObject(PdfObject& obj, std::unique_ptr<PdfFileSpec>& filespec);
38
42 nullable<const PdfString&> GetFilename() const;
43
44 void SetFilename(nullable<const PdfString&> filename);
45
46 void SetEmbeddedData(nullable<const charbuff&> data);
47
48 void SetEmbeddedDataFromFile(const std::string_view& filepath);
49
50 nullable<charbuff> GetEmbeddedData() const;
51
52private:
53 void setData(InputStream& stream, size_t size);
54};
55
56};
57
58#endif // PDF_FILE_SPEC_H
59
SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domseichter@web.de SPDX-FileCopyrightText: (C) 2020...
An interface for reading blocks of data from a data source.
Definition InputStream.h:20
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:111
A file specification is used in the PDF file to refer to another file.
Definition PdfFileSpec.h:24
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16