PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfTextState.h
1// SPDX-FileCopyrightText: 2021 Francesco Pretto <ceztko@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
3
4#ifndef PDF_TEXT_STATE_H
5#define PDF_TEXT_STATE_H
6
7#include "PdfDeclarations.h"
8#include <podofo/auxiliary/Matrix.h>
9
10namespace PoDoFo
11{
12 class PdfFont;
13
14 // TODO: Add missing properties ISO 32000-1:2008 "9.3 Text State Parameters and Operators"
15 struct PODOFO_API PdfTextState final
16 {
23 std::vector<std::string> SplitTextAsLines(const std::string_view& str, double width, bool preserveTrailingSpaces = false) const;
24
25 const PdfFont* Font = nullptr;
26 double FontSize = 10;
27 double FontScale = 1;
28 double CharSpacing = 0;
29 double WordSpacing = 0;
30 PdfTextRenderingMode RenderingMode = PdfTextRenderingMode::Fill;
31 class Matrix Matrix;
32 };
33}
34
35#endif // PDF_TEXT_STATE_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
PdfTextRenderingMode
Enum for text rendering mode (Tr)
Definition PdfDeclarations.h:364