PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
page.h
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CXX_PDF_PAGE_H_INCLUDED_
4#define PDFSDK_CXX_PDF_PAGE_H_INCLUDED_
5
7#include <pdfsdk/cxx/math.h>
8
9#include "forward_declarations.h"
10#include "wrapper_base.h"
11
12namespace PDF {
13
20class Page : public detail::RefCountedHandle<PDPage> {
21public:
27
35
40 bool IsContentModified() const;
41
48 void SetContentModified(bool modified = true);
49
57
62 size_t GetPageIndex() const;
63
69
74 void SetRotate(PDRotate rotate);
75
81
86 void SetCropBox(const RectF& box);
87
93
98 void SetMediaBox(const PDF::RectF& box);
99
105
110 void SetArtBox(const RectF& box);
111
117
122 void SetBleedBox(const RectF& box);
123
129
134 void SetTrimBox(const RectF& box);
135
141
146 float GetUserUnitSize() const;
147
152 void SetUserUnitSize(float unitSize);
153
161 Matrix GetPageToDevSpaceMatrix(float zoom = 1.f, PDRotate rotate = kPDRotate_0, float dpi = 96) const;
162
170 Matrix GetDevToPageSpaceMatrix(float zoom = 1.f, PDRotate rotate = kPDRotate_0, float dpi = 96) const;
171
179 RectF GetDevSpacePageBox(float zoom = 1.f, PDRotate rotate = kPDRotate_0, float dpi = 96) const;
180
185 size_t GetNumAnnots() const;
186
192 Annot GetAnnot(size_t index) const;
193
198 void AddAnnot(Annot annot);
199
205 void InsertAnnot(size_t insertAt, Annot annot);
206
211 void RemoveAnnot(Annot annot);
212
217 void RemoveAnnotByIndex(size_t index);
218
224 size_t GetAnnotIndex(Annot annot) const;
225
231
237
238 PDF_CXX_CORE_WRAPPER_DEFINE_MEMBERS_(Page, PDPage)
239};
240
241} // namespace PDF
242
243#include "page_impl.inl"
244
245#endif // PDFSDK_CXX_PDF_PAGE_H_INCLUDED_
Represents an annotation in a PDF document.
Definition annot.h:19
Represents the content of a PDF page.
Definition content.h:20
Represents a PDF document.
Definition document.h:22
Represents a PDF object.
Definition object.h:20
Represents a leaf node (Page Object).
Definition page.h:20
void FlushModifiedContent()
Content GetContent() const
void SetContentModified(bool modified=true)
Set the content modified flag.
RectF GetDevSpacePageBox(float zoom=1.f, PDRotate rotate=kPDRotate_0, float dpi=96) const
RectF GetBleedBox() const
void SetArtBox(const RectF &box)
void SetMediaBox(const PDF::RectF &box)
float GetUserUnitSize() const
Annot GetAnnot(size_t index) const
Matrix GetDevToPageSpaceMatrix(float zoom=1.f, PDRotate rotate=kPDRotate_0, float dpi=96) const
PDRotate GetRotate() const
void SetUserUnitSize(float unitSize)
RectF GetArtBox() const
RectF GetTrimBox() const
RectF GetMediaBox() const
void SetBleedBox(const RectF &box)
RectF GetPageBox() const
void RemoveAnnot(Annot annot)
bool IsContentModified() const
Get the content modified flag.
size_t GetNumAnnots() const
void AddAnnot(Annot annot)
void InsertAnnot(size_t insertAt, Annot annot)
Document GetDocument() const
void SetCropBox(const RectF &box)
void SetRotate(PDRotate rotate)
void RemoveAnnotByIndex(size_t index)
Matrix GetPageToDevSpaceMatrix(float zoom=1.f, PDRotate rotate=kPDRotate_0, float dpi=96) const
void SetTrimBox(const RectF &box)
size_t GetAnnotIndex(Annot annot) const
size_t GetPageIndex() const
Object GetPdfObject() const
RectF GetCropBox() const
PageText GetPageText() const
Represents text on a page.
Definition page_text.h:47
Document API.
Definition math.h:1037
Definition math.h:544
PDRotate
Specifies degrees of rotation.
Definition types.h:38
@ kPDRotate_0
Definition types.h:39