PoDoFo 1.0.0-dev
|
PdfPage is one page in the pdf document. More...
#include <PdfPage.h>
Public Member Functions | |
void | ExtractTextTo (std::vector< PdfTextEntry > &entries, const PdfTextExtractParams ¶ms) const |
void | ExtractTextTo (std::vector< PdfTextEntry > &entries, const std::string_view &pattern={ }, const PdfTextExtractParams ¶ms={ }) const |
Rect | GetRect () const |
Get the rectangle of this page. | |
void | SetRect (const Rect &rect) |
Set the rectangle of this annotation. | |
Corners | GetRectRaw () const override |
Get the current canvas size in PDF Units. | |
void | SetRectRaw (const Corners &rect) |
bool | TryGetRotationRadians (double &teta) const override |
Try getting the current canvas rotation. | |
double | GetRotationRadians () const |
Get the current page rotation in radians. | |
void | SetMediaBox (const Rect &rect) |
Set the /MediaBox in PDF Units. | |
void | SetCropBox (const Rect &rect) |
Set the /CropBox in PDF Units. | |
void | SetTrimBox (const Rect &rect) |
Set the /TrimBox in PDF Units. | |
void | SetBleedBox (const Rect &rect) |
Set the /BleedBox in PDF Units. | |
void | SetArtBox (const Rect &rect) |
Set the /ArtBox in PDF Units. | |
unsigned | GetPageNumber () const |
Page number inside of the document. | |
Rect | GetMediaBox () const |
Get the current MediaBox (physical page size) in PDF units. | |
Corners | GetMediaBoxRaw () const |
Rect | GetCropBox () const |
Get the current CropBox (visible page size) in PDF units. | |
Corners | GetCropBoxRaw () const |
Rect | GetTrimBox () const |
Get the current TrimBox (cut area) in PDF units. | |
Corners | GetTrimBoxRaw () const |
Rect | GetBleedBox () const |
Get the current BleedBox (extra area for printing purposes) in PDF units. | |
Corners | GetBleedBoxRaw () const |
Rect | GetArtBox () const |
Get the current ArtBox in PDF units. | |
Corners | GetArtBoxRaw () const |
unsigned | GetRotation () const |
Get the normalized page rotation (0, 90, 180 or 270) | |
bool | TryGetRotationRaw (double &rotation) const |
Get the raw page rotation (if any) | |
void | SetRotation (int rotation) |
Set the current page rotation. | |
bool | MoveTo (unsigned index) |
Move the page to the given index. | |
template<typename TField > | |
TField & | CreateField (const std::string_view &name, const Rect &rect) |
PdfField & | CreateField (const std::string_view &name, PdfFieldType fieldType, const Rect &rect) |
PdfPageFieldIterable | GetFieldsIterator () |
Get an iterator for all fields in the page. | |
PdfPageConstFieldIterable | GetFieldsIterator () const |
unsigned | GetIndex () const |
PdfContents & | GetOrCreateContents () |
const PdfContents * | GetContents () const |
PdfContents * | GetContents () |
const PdfContents & | MustGetContents () const |
PdfContents & | MustGetContents () |
const PdfResources & | GetResources () const |
PdfResources & | GetResources () |
PdfAnnotationCollection & | GetAnnotations () |
const PdfAnnotationCollection & | GetAnnotations () const |
![]() | |
virtual | ~PdfCanvas () |
Virtual destructor to avoid compiler warnings. | |
const PdfObject * | GetContentsObject () const |
Get access to the contents object of this page. | |
PdfObject * | GetContentsObject () |
charbuff | GetContentsCopy () const |
void | CopyContentsTo (charbuff &buffer) const |
PdfResources * | GetResources () |
Get the resource object of this page. | |
const PdfResources * | GetResources () const |
PdfDictionaryElement & | GetElement () |
const PdfDictionaryElement & | GetElement () const |
void | EnsureResourcesCreated () |
Ensure resources initialized on this canvas. | |
Static Public Member Functions | |
static Rect | CreateStandardPageSize (const PdfPageSize pageSize, bool landscape=false) |
Creates a Rect with the page size as values which is needed to create a PdfPage object from an enum which are defined for a few standard page sizes. | |
Friends | |
class | PdfPageCollection |
class | PdfDocument |
Additional Inherited Members |
PdfPage is one page in the pdf document.
It is possible to draw on a page using a PdfPainter object. Every document needs at least one page.
|
static |
Rect PdfPage::GetBleedBox | ( | ) | const |
Get the current BleedBox (extra area for printing purposes) in PDF units.
Rect PdfPage::GetCropBox | ( | ) | const |
Get the current CropBox (visible page size) in PDF units.
PdfPageFieldIterable PdfPage::GetFieldsIterator | ( | ) |
Get an iterator for all fields in the page.
All widget annotation fields in the pages will be returned
Rect PdfPage::GetMediaBox | ( | ) | const |
Get the current MediaBox (physical page size) in PDF units.
unsigned PdfPage::GetPageNumber | ( | ) | const |
Page number inside of the document.
The first page has the number 1
|
inline |
Get the rectangle of this page.
|
overridevirtual |
Get the current canvas size in PDF Units.
Implements PoDoFo::PdfCanvas.
|
inline |
Get the normalized page rotation (0, 90, 180 or 270)
double PdfPage::GetRotationRadians | ( | ) | const |
Get the current page rotation in radians.
Rect PdfPage::GetTrimBox | ( | ) | const |
Get the current TrimBox (cut area) in PDF units.
Set the /ArtBox in PDF Units.
rect | a Rect in PDF units |
Set the /BleedBox in PDF Units.
rect | a Rect in PDF units |
Set the /CropBox in PDF Units.
rect | a Rect in PDF units |
Set the /MediaBox in PDF Units.
rect | a Rect in PDF units |
Set the rectangle of this annotation.
rect | rectangle to set. It's oriented according to the canonical PDF coordinate system |
Set the current page rotation.
rotation | The rotation to set to the page. Must be a multiple of 90 |
Set the /TrimBox in PDF Units.
rect | a Rect in PDF units |
Try getting the current canvas rotation.
teta | counterclockwise rotation in radians |
Implements PoDoFo::PdfCanvas.
Get the raw page rotation (if any)
rotation | a clockwise rotation in degrees |