All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PageLabel.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2024 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  {
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
UString GetLabelTitle(int page_num)
Lowercase Roman numerals.
Definition: PageLabel.h:96
Uppercase Roman numerals.
Definition: PageLabel.h:95
Uppercase letters (A to Z for the first 26 pages, AA to ZZ for the next 26, and so on) ...
Definition: PageLabel.h:97
Lowercase letters (a to z for the first 26 pages, aa to zz for the next 26, and so on) ...
Definition: PageLabel.h:98
No numeric portion in the label.
Definition: PageLabel.h:99
PageLabel(SDF::Obj l=0, int first_page=-1, int last_page=-1)
Style GetStyle() const
static PageLabel Create(SDF::SDFDoc &doc, Style style, const UString &prefix="", int start_at=1)
void SetStart(int start_at)
UString GetPrefix() const
bool operator==(const PageLabel &d)
void SetPrefix(const UString &prefix)
void SetStyle(Style style)
Decimal Arabic numerals.
Definition: PageLabel.h:94
SDF::Obj GetSDFObj() const
PageLabel & operator=(const PageLabel &d)