Loading...
Searching...
No Matches
PageLabel.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFPageLabel
6#define PDFTRON_H_CPPPDFPageLabel
7
8#include <C/PDF/TRN_PageLabel.h>
9#include <SDF/SDFDoc.h>
10
11 namespace pdftron {
12 namespace PDF {
13
87 class PageLabel : private TRN_PageLabel
88{
89 public:
90
91 // The numbering style to be used for the numeric portion of page label.
92 enum Style
93 {
94 e_decimal,
95 e_roman_uppercase,
96 e_roman_lowercase,
97 e_alphabetic_uppercase,
98 e_alphabetic_lowercase,
99 e_none
100 };
101
114 static PageLabel Create(SDF::SDFDoc& doc, Style style, const UString& prefix = "", int start_at = 1);
115
121 PageLabel(SDF::Obj l=0, int first_page=-1, int last_page=-1);
122
126 PageLabel (const PageLabel& d);
127
131 PageLabel& operator=(const PageLabel& d);
132
140 bool operator==(const PageLabel& d);
141
147 bool IsValid() const;
148
154 UString GetLabelTitle(int page_num);
155
171 void SetStyle(Style style);
172
176 Style GetStyle() const;
177
182 UString GetPrefix() const;
183
188 void SetPrefix(const UString& prefix);
189
194 int GetStart() const;
195
201 void SetStart(int start_at);
202
207 int GetFirstPageNum();
208
213 int GetLastPageNum();
214
218 SDF::Obj GetSDFObj () const;
219
220// @cond PRIVATE_DOC
221#ifndef SWIGHIDDEN
222 PageLabel(const TRN_PageLabel&);
223#endif
224// @endcond
225};
226
227
228
229#include <Impl/PageLabel.inl>
230
231 }; // namespace PDF
232}; // namespace pdftron
233
234#endif // PDFTRON_H_CPPPDFPageLabel
SDFDoc.h
pdftron::PDF::PageLabel::operator==
bool operator==(const PageLabel &d)
pdftron::PDF::PageLabel::GetStart
int GetStart() const
pdftron::PDF::PageLabel::GetFirstPageNum
int GetFirstPageNum()
pdftron::PDF::PageLabel::PageLabel
PageLabel(SDF::Obj l=0, int first_page=-1, int last_page=-1)
pdftron::PDF::PageLabel::SetStyle
void SetStyle(Style style)
pdftron::PDF::PageLabel::GetStyle
Style GetStyle() const
pdftron::PDF::PageLabel::operator=
PageLabel & operator=(const PageLabel &d)
pdftron::PDF::PageLabel::SetStart
void SetStart(int start_at)
pdftron::PDF::PageLabel::GetLastPageNum
int GetLastPageNum()
pdftron::PDF::PageLabel::Style
Style
Definition PageLabel.h:93
pdftron::PDF::PageLabel::e_roman_uppercase
@ e_roman_uppercase
Uppercase Roman numerals.
Definition PageLabel.h:95
pdftron::PDF::PageLabel::e_none
@ e_none
No numeric portion in the label.
Definition PageLabel.h:99
pdftron::PDF::PageLabel::e_alphabetic_uppercase
@ e_alphabetic_uppercase
Uppercase letters (A to Z for the first 26 pages, AA to ZZ for the next 26, and so on)
Definition PageLabel.h:97
pdftron::PDF::PageLabel::e_decimal
@ e_decimal
Decimal Arabic numerals.
Definition PageLabel.h:94
pdftron::PDF::PageLabel::e_alphabetic_lowercase
@ e_alphabetic_lowercase
Lowercase letters (a to z for the first 26 pages, aa to zz for the next 26, and so on)
Definition PageLabel.h:98
pdftron::PDF::PageLabel::e_roman_lowercase
@ e_roman_lowercase
Lowercase Roman numerals.
Definition PageLabel.h:96
pdftron::PDF::PageLabel::SetPrefix
void SetPrefix(const UString &prefix)
pdftron::PDF::PageLabel::Create
static PageLabel Create(SDF::SDFDoc &doc, Style style, const UString &prefix="", int start_at=1)
pdftron::PDF::PageLabel::GetLabelTitle
UString GetLabelTitle(int page_num)
pdftron::PDF::PageLabel::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::PageLabel::GetPrefix
UString GetPrefix() const
pdftron::PDF::PageLabel::PageLabel
PageLabel(const PageLabel &d)
pdftron::PDF::PageLabel::IsValid
bool IsValid() const
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::UString
Definition UString.h:28
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10