7#ifndef PDF_MEM_DOCUMENT_H
8#define PDF_MEM_DOCUMENT_H
10#include <podofo/auxiliary/InputDevice.h>
11#include <podofo/auxiliary/OutputDevice.h>
13#include "PdfDocument.h"
14#include "PdfEncryptSession.h"
19class PdfEncryptSession;
77 void Load(
const std::shared_ptr<InputStreamDevice>&
device,
const std::string_view&
password = { });
151 void SetEncrypt(std::unique_ptr<PdfEncrypt>&&
encrypt);
153 const PdfEncrypt* GetEncrypt()
const override;
168 void loadFromDevice(
const std::shared_ptr<InputStreamDevice>&
device,
const std::string_view&
password);
178 void clear()
override;
180 void reset()
override;
190 bool m_HasXRefStream;
192 std::unique_ptr<PdfEncryptSession> m_Encrypt;
193 std::shared_ptr<InputStreamDevice> m_device;
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:111
A class that is used to encrypt a PDF file and set document permissions on the PDF file.
Definition PdfEncrypt.h:118
PdfMemDocument is the core class for reading and manipulating PDF files and writing them back to disk...
Definition PdfMemDocument.h:38
void Load(const std::shared_ptr< InputStreamDevice > &device, const std::string_view &password={ })
Load a PdfMemDocument from a PdfRefCountedInputDevice.
void Save(const std::string_view &filename, PdfSaveOptions opts=PdfSaveOptions::None)
Save the complete document to a file.
void Load(const std::string_view &filename, const std::string_view &password={ })
Load a PdfMemDocument from a file.
void SaveUpdate(const std::string_view &filename, PdfSaveOptions opts=PdfSaveOptions::None)
Save the document changes to a file.
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
PdfEncryptionAlgorithm
The encryption algorithm.
Definition PdfEncrypt.h:88
PdfSaveOptions
Definition PdfDeclarations.h:469
cspan< char > bufferview
Convenient read-only char buffer span.
Definition basetypes.h:19
PdfPermissions
Set user permissions/restrictions on a document.
Definition PdfEncrypt.h:64
PdfKeyLength
A enum specifying a valid keylength for a PDF encryption key.
Definition PdfEncrypt.h:41
PdfVersion
Enum to identify different versions of the PDF file format.
Definition PdfDeclarations.h:71