#include <PdfPage.h>
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.
◆ CreateStandardPageSize()
| Rect PdfPage::CreateStandardPageSize |
( |
const PdfPageSize | pageSize, |
|
|
bool | landscape = false ) |
|
static |
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.
- Parameters
-
| pageSize | the page size you want |
| landscape | create a landscape pagesize instead of portrait (by exchanging width and height) |
- Returns
- a Rect object which can be passed to the PdfPage constructor
◆ GetArtBox()
| Rect PdfPage::GetArtBox |
( |
bool | raw = false | ) |
const |
Get the current ArtBox in PDF units.
- Returns
- Rect the page box
◆ GetBleedBox()
| Rect PdfPage::GetBleedBox |
( |
bool | raw = false | ) |
const |
Get the current BleedBox (extra area for printing purposes) in PDF units.
- Returns
- Rect the page box
◆ GetCropBox()
| Rect PdfPage::GetCropBox |
( |
bool | raw = false | ) |
const |
Get the current CropBox (visible page size) in PDF units.
- Returns
- Rect the page box
◆ GetMediaBox()
| Rect PdfPage::GetMediaBox |
( |
bool | raw = false | ) |
const |
Get the current MediaBox (physical page size) in PDF units.
- Returns
- Rect the page box
◆ GetOrCreateResources()
Get or create the resource object of this page.
- Returns
- a resources object
Implements PoDoFo::PdfCanvas.
◆ GetPageNumber()
| unsigned PdfPage::GetPageNumber |
( |
| ) |
const |
Page number inside of the document. The first page has the number 1
- Returns
- the number of the page inside of the document
◆ GetRectRaw()
| Rect PdfPage::GetRectRaw |
( |
| ) |
const |
|
overridevirtual |
Get the current canvas size in PDF Units
- Returns
- a Rect containing the page size available for drawing
Implements PoDoFo::PdfCanvas.
◆ GetRotationRaw()
| int PdfPage::GetRotationRaw |
( |
| ) |
const |
Get the current page rotation (if any), it's a clockwise rotation
- Returns
- int 0, 90, 180 or 270
◆ GetTrimBox()
| Rect PdfPage::GetTrimBox |
( |
bool | raw = false | ) |
const |
Get the current TrimBox (cut area) in PDF units.
- Returns
- Rect the page box
◆ HasRotation()
| bool PdfPage::HasRotation |
( |
double & | teta | ) |
const |
|
overridevirtual |
Get the current canvas rotation
- Parameters
-
| teta | counterclockwise rotation in radians |
- Returns
- true if the canvas has a rotation
Implements PoDoFo::PdfCanvas.
◆ MoveAt()
| void PdfPage::MoveAt |
( |
unsigned | index | ) |
|
Move the page at the given index
◆ SetArtBox()
| void PdfPage::SetArtBox |
( |
const Rect & | rect, |
|
|
bool | raw = false ) |
Set the /ArtBox in PDF Units
- Parameters
-
◆ SetBleedBox()
| void PdfPage::SetBleedBox |
( |
const Rect & | rect, |
|
|
bool | raw = false ) |
Set the /BleedBox in PDF Units
- Parameters
-
◆ SetCropBox()
| void PdfPage::SetCropBox |
( |
const Rect & | rect, |
|
|
bool | raw = false ) |
Set the /CropBox in PDF Units
- Parameters
-
◆ SetICCProfile()
| void PdfPage::SetICCProfile |
( |
const std::string_view & | csTag, |
|
|
InputStream & | stream, |
|
|
int64_t | colorComponents, |
|
|
PdfColorSpace | alternateColorSpace = PdfColorSpace::DeviceRGB ) |
Set an ICC profile for this page
- Parameters
-
| 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 |
- See also
- PdfPainter::SetDependICCProfileColor()
◆ SetMediaBox()
| void PdfPage::SetMediaBox |
( |
const Rect & | rect, |
|
|
bool | raw = false ) |
Set the /MediaBox in PDF Units
- Parameters
-
◆ SetPageHeight()
| bool PdfPage::SetPageHeight |
( |
int | newHeight | ) |
|
Set the current page height in PDF Units
- Returns
- true if successful, false otherwise
◆ SetPageWidth()
| bool PdfPage::SetPageWidth |
( |
int | newWidth | ) |
|
Set the current page width in PDF Units
- Returns
- true if successful, false otherwise
◆ SetRotationRaw()
| void PdfPage::SetRotationRaw |
( |
int | rotation | ) |
|
Set the current page rotation.
- Parameters
-
| iRotation | Rotation to set to the page. Valid value are 0, 90, 180, 270. |
◆ SetTrimBox()
| void PdfPage::SetTrimBox |
( |
const Rect & | rect, |
|
|
bool | raw = false ) |
Set the /TrimBox in PDF Units
- Parameters
-
The documentation for this class was generated from the following files: