PoDoFo 0.9.20
|
#include <PdfPage.h>
Public Member Functions | |
Rect | GetRectRaw () const override |
bool | HasRotation (double &teta) const override |
bool | SetPageWidth (int newWidth) |
bool | SetPageHeight (int newHeight) |
void | SetMediaBox (const Rect &rect, bool raw=false) |
void | SetCropBox (const Rect &rect, bool raw=false) |
void | SetTrimBox (const Rect &rect, bool raw=false) |
void | SetBleedBox (const Rect &rect, bool raw=false) |
void | SetArtBox (const Rect &rect, bool raw=false) |
unsigned | GetPageNumber () const |
Rect | GetMediaBox (bool raw=false) const |
Rect | GetCropBox (bool raw=false) const |
Rect | GetTrimBox (bool raw=false) const |
Rect | GetBleedBox (bool raw=false) const |
Rect | GetArtBox (bool raw=false) const |
int | GetRotationRaw () const |
void | SetRotationRaw (int rotation) |
void | MoveAt (unsigned index) |
void | SetICCProfile (const std::string_view &csTag, InputStream &stream, int64_t colorComponents, PdfColorSpace alternateColorSpace=PdfColorSpace::DeviceRGB) |
PdfResources & | GetOrCreateResources () override |
![]() | |
virtual | ~PdfCanvas () |
const PdfObject * | GetContentsObject () const |
PdfObject * | GetFromResources (const std::string_view &type, const std::string_view &key) |
PdfResources * | GetResources () |
Static Public Member Functions | |
static Rect | CreateStandardPageSize (const PdfPageSize pageSize, bool landscape=false) |
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::GetArtBox | ( | bool | raw = false | ) | const |
Get the current ArtBox in PDF units.
Rect PdfPage::GetBleedBox | ( | bool | raw = false | ) | const |
Get the current BleedBox (extra area for printing purposes) in PDF units.
Rect PdfPage::GetCropBox | ( | bool | raw = false | ) | const |
Get the current CropBox (visible page size) in PDF units.
Rect PdfPage::GetMediaBox | ( | bool | raw = false | ) | const |
Get the current MediaBox (physical page size) in PDF units.
|
overridevirtual |
Get or create the resource object of this page.
Implements PoDoFo::PdfCanvas.
unsigned PdfPage::GetPageNumber | ( | ) | const |
Page number inside of the document. The first page has the number 1
|
overridevirtual |
Get the current canvas size in PDF Units
Implements PoDoFo::PdfCanvas.
int PdfPage::GetRotationRaw | ( | ) | const |
Get the current page rotation (if any), it's a clockwise rotation
Rect PdfPage::GetTrimBox | ( | bool | raw = false | ) | const |
Get the current TrimBox (cut area) in PDF units.
|
overridevirtual |
Get the current canvas rotation
teta | counterclockwise rotation in radians |
Implements PoDoFo::PdfCanvas.
void PdfPage::MoveAt | ( | unsigned | index | ) |
Move the page at the given index
void PdfPage::SetArtBox | ( | const Rect & | rect, |
bool | raw = false |
||
) |
Set the /ArtBox in PDF Units
rect | a Rect in PDF units |
void PdfPage::SetBleedBox | ( | const Rect & | rect, |
bool | raw = false |
||
) |
Set the /BleedBox in PDF Units
rect | a Rect in PDF units |
void PdfPage::SetCropBox | ( | const Rect & | rect, |
bool | raw = false |
||
) |
Set the /CropBox in PDF Units
rect | a Rect in PDF units |
void PdfPage::SetICCProfile | ( | const std::string_view & | csTag, |
InputStream & | stream, | ||
int64_t | colorComponents, | ||
PdfColorSpace | alternateColorSpace = PdfColorSpace::DeviceRGB |
||
) |
Set an ICC profile for this page
csTag | a ColorSpace tag |
stream | an input stream from which the ICC profiles data can be read |
colorComponents | the number of colorcomponents of the ICC profile (expected is 1, 3 or 4 components) |
alternateColorSpace | an alternate colorspace to use if the ICC profile cannot be used |
void PdfPage::SetMediaBox | ( | const Rect & | rect, |
bool | raw = false |
||
) |
Set the /MediaBox in PDF Units
rect | a Rect in PDF units |
bool PdfPage::SetPageHeight | ( | int | newHeight | ) |
Set the current page height in PDF Units
bool PdfPage::SetPageWidth | ( | int | newWidth | ) |
Set the current page width in PDF Units
void PdfPage::SetRotationRaw | ( | int | rotation | ) |
Set the current page rotation.
iRotation | Rotation to set to the page. Valid value are 0, 90, 180, 270. |