PoDoFo
1.2.0
Loading...
Searching...
No Matches
src
podofo
main
PdfDestination.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_DESTINATION_H
5
#define PDF_DESTINATION_H
6
7
#include "
PdfDeclarations.h
"
8
9
#include <podofo/auxiliary/Rect.h>
10
#include "PdfElement.h"
11
12
namespace
PoDoFo
{
13
14
class
PdfPage;
15
16
enum class
PdfDestinationFit : uint8_t
17
{
18
Unknown = 0,
19
Fit,
20
FitH,
21
FitV,
22
FitB,
23
FitBH,
24
FitBV,
25
};
26
30
enum class
PdfDestinationType
:
uint8_t
31
{
32
Unknown = 0,
33
XYZ,
34
Fit,
35
FitH,
36
FitV,
37
FitR,
38
FitB,
39
FitBH,
40
FitBV,
41
};
42
47
class
PODOFO_API
PdfDestination
final
:
public
PdfArrayElement
48
{
49
friend
class
PdfDocument
;
50
friend
class
PdfAnnotationLink;
51
friend
class
PdfOutlineItem
;
52
friend
class
PdfNameTreeBase;
53
54
private
:
57
PdfDestination
(
PdfObject
&
obj
);
58
60
PdfDestination
(
PdfDocument
&
doc
);
61
62
PdfDestination
(
const
PdfDestination
&) =
default
;
63
64
public
:
65
static
bool
TryCreateFromObject(
PdfObject
&
obj
, std::unique_ptr<PdfDestination>&
dest
);
66
70
void
SetDestination(
const
PdfPage
&
page
, PdfDestinationFit
fit
= PdfDestinationFit::Fit);
71
75
void
SetDestination(
const
PdfPage
&
page
,
const
Rect
&
rect
);
76
83
void
SetDestination(
const
PdfPage
&
page
,
double
left
,
double
top
,
double
zoom
);
84
90
void
SetDestination(
const
PdfPage
&
page
, PdfDestinationFit
fit
,
double
value);
91
97
PdfPage
* GetPage();
98
102
PdfDestinationType
GetType()
const
;
103
109
double
GetZoom()
const
;
110
116
Rect
GetRect()
const
;
117
123
double
GetTop()
const
;
124
130
double
GetLeft()
const
;
131
137
double
GetDValue()
const
;
138
139
private
:
146
void
AddToDictionary(
PdfDictionary
&
dictionary
)
const
;
147
};
148
149
};
150
151
#endif
// PDF_DESTINATION_H
152
PdfDeclarations.h
This file should be included as the FIRST file in every header of PoDoFo lib.
PoDoFo::PdfDestination
A destination in a PDF file.
Definition
PdfDestination.h:48
PoDoFo::PdfDictionary
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition
PdfDictionary.h:77
PoDoFo::PdfDocument
PdfDocument is the core interface for working with PDF documents.
Definition
PdfDocument.h:108
PoDoFo::PdfObject
This class represents a PDF indirect Object in memory.
Definition
PdfObject.h:31
PoDoFo::PdfOutlineItem
A PDF outline item has a title and a destination.
Definition
PdfOutlines.h:33
PoDoFo::PdfPage
PdfPage is one page in the pdf document.
Definition
PdfPage.h:133
PoDoFo::Rect
An normalized rectangle defined by position (left-bottom) and size.
Definition
Rect.h:17
PoDoFo::charbuff_t
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition
basetypes.h:30
PoDoFo
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition
basetypes.h:13
PoDoFo::PdfDestinationType
PdfDestinationType
Destination type, as per 12.3.2.2 of the Pdf spec.
Definition
PdfDestination.h:31
Generated by
1.9.8