PoDoFo
1.0.0-dev
Loading...
Searching...
No Matches
src
podofo
main
PdfDestination.h
1
6
#ifndef PDF_DESTINATION_H
7
#define PDF_DESTINATION_H
8
9
#include "
PdfDeclarations.h
"
10
11
#include <podofo/auxiliary/Rect.h>
12
#include "PdfElement.h"
13
14
namespace
PoDoFo
{
15
16
class
PdfPage;
17
18
enum class
PdfDestinationFit : uint8_t
19
{
20
Unknown = 0,
21
Fit,
22
FitH,
23
FitV,
24
FitB,
25
FitBH,
26
FitBV,
27
};
28
33
enum class
PdfDestinationType
:
uint8_t
34
{
35
Unknown = 0,
36
XYZ,
37
Fit,
38
FitH,
39
FitV,
40
FitR,
41
FitB,
42
FitBH,
43
FitBV,
44
};
45
51
class
PODOFO_API
PdfDestination
final
:
public
PdfArrayElement
52
{
53
friend
class
PdfDocument
;
54
friend
class
PdfAnnotationLink;
55
friend
class
PdfOutlineItem
;
56
friend
class
PdfNameTreeBase;
57
58
private
:
62
PdfDestination
(
PdfObject
&
obj
);
63
66
PdfDestination
(
PdfDocument
&
doc
);
67
68
PdfDestination
(
const
PdfDestination
&) =
default
;
69
70
public
:
71
static
bool
TryCreateFromObject(
PdfObject
&
obj
, std::unique_ptr<PdfDestination>&
dest
);
72
77
void
SetDestination(
const
PdfPage
&
page
, PdfDestinationFit
fit
= PdfDestinationFit::Fit);
78
83
void
SetDestination(
const
PdfPage
&
page
,
const
Rect
&
rect
);
84
92
void
SetDestination(
const
PdfPage
&
page
,
double
left
,
double
top
,
double
zoom
);
93
100
void
SetDestination(
const
PdfPage
&
page
, PdfDestinationFit
fit
,
double
value);
101
108
PdfPage
* GetPage();
109
114
PdfDestinationType
GetType()
const
;
115
122
double
GetZoom()
const
;
123
130
Rect
GetRect()
const
;
131
138
double
GetTop()
const
;
139
146
double
GetLeft()
const
;
147
154
double
GetDValue()
const
;
155
156
private
:
164
void
AddToDictionary(
PdfDictionary
&
dictionary
)
const
;
165
};
166
167
};
168
169
#endif
// PDF_DESTINATION_H
170
PdfDeclarations.h
SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domseichter@web.de SPDX-FileCopyrightText: (C) 2020...
PoDoFo::PdfDestination
A destination in a PDF file.
Definition
PdfDestination.h:52
PoDoFo::PdfDictionary
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition
PdfDictionary.h:82
PoDoFo::PdfDocument
PdfDocument is the core interface for working with PDF documents.
Definition
PdfDocument.h:111
PoDoFo::PdfObject
This class represents a PDF indirect Object in memory.
Definition
PdfObject.h:35
PoDoFo::PdfOutlineItem
A PDF outline item has an title and a destination.
Definition
PdfOutlines.h:39
PoDoFo::PdfPage
PdfPage is one page in the pdf document.
Definition
PdfPage.h:129
PoDoFo::Rect
An normalized rectangle defined by position (left-bottom) and size.
Definition
Rect.h:20
PoDoFo::charbuff_t
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition
basetypes.h:38
PoDoFo
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition
basetypes.h:16
PoDoFo::PdfDestinationType
PdfDestinationType
Destination type, as per 12.3.2.2 of the Pdf spec.
Definition
PdfDestination.h:34
Generated by
1.9.8