|
pdfmm 0.9.20
|
#include <PdfPage.h>
Public Member Functions | |
| PdfPage (PdfDocument &parent, const PdfRect &size) | |
| PdfPage (PdfObject &obj, const std::deque< PdfObject * > &listOfParents) | |
| PdfRect | GetRect () const override |
| bool | HasRotation (double &teta) const override |
| bool | SetPageWidth (int newWidth) |
| bool | SetPageHeight (int newHeight) |
| void | SetMediaBox (const PdfRect &size) |
| void | SetTrimBox (const PdfRect &size) |
| unsigned | GetPageNumber () const |
| PdfRect | GetMediaBox () const |
| PdfRect | GetCropBox () const |
| PdfRect | GetTrimBox () const |
| PdfRect | GetBleedBox () const |
| PdfRect | GetArtBox () const |
| int | GetRotationRaw () const |
| void | SetRotationRaw (int rotation) |
| unsigned | GetAnnotationCount () const |
| PdfAnnotation * | CreateAnnotation (PdfAnnotationType annotType, const PdfRect &rect) |
| PdfAnnotation * | GetAnnotation (unsigned index) |
| void | DeleteAnnotation (unsigned index) |
| PdfObject * | GetFromResources (const PdfName &type, const PdfName &key) |
| void | DeleteAnnotation (PdfObject &annotObj) |
| const PdfObject * | GetInheritedKey (const PdfName &name) const |
| void | SetICCProfile (const std::string_view &csTag, PdfInputStream &stream, int64_t colorComponents, PdfColorSpace alternateColorSpace=PdfColorSpace::DeviceRGB) |
Public Member Functions inherited from mm::PdfCanvas | |
| virtual | ~PdfCanvas () |
| virtual PdfObject & | GetOrCreateContentsObject ()=0 |
| virtual PdfStream & | GetStreamForAppending (PdfStreamAppendFlags flags)=0 |
| virtual PdfResources & | GetOrCreateResources ()=0 |
| virtual PdfRect | GetRect () const =0 |
| virtual bool | HasRotation (double &teta) const =0 |
| void | AddColorResource (const PdfColor &color) |
| void | AddResource (const PdfName &identifier, const PdfReference &ref, const PdfName &name) |
Static Public Member Functions | |
| static PdfRect | CreateStandardPageSize (const PdfPageSize pageSize, bool landscape=false) |
Static Public Member Functions inherited from mm::PdfCanvas | |
| static PdfArray | GetProcSet () |
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.
| PdfPage::PdfPage | ( | PdfDocument & | parent, |
| const PdfRect & | size | ||
| ) |
| PdfAnnotation * PdfPage::CreateAnnotation | ( | PdfAnnotationType | annotType, |
| const PdfRect & | rect | ||
| ) |
Create a new annotation to this page.
| annotType | the type of the annotation |
| rect | rectangle of the annotation on the page |
|
static |
| void PdfPage::DeleteAnnotation | ( | PdfObject & | annotObj | ) |
Delete the annotation with the given object
| annotObj | the object of an annotation |
| void PdfPage::DeleteAnnotation | ( | unsigned | index | ) |
Delete the annotation with index index from this page.
| index | the index of the annotation to delete |
| PdfAnnotation * PdfPage::GetAnnotation | ( | unsigned | index | ) |
Get the annotation with index index of the current page.
| index | the index of the annotation to retrieve |
| unsigned PdfPage::GetAnnotationCount | ( | ) | const |
Get the number of annotations associated with this page \ returns int number of annotations
| PdfRect PdfPage::GetArtBox | ( | ) | const |
Get the current ArtBox in PDF units.
| PdfRect PdfPage::GetBleedBox | ( | ) | const |
Get the current BleedBox (extra area for printing purposes) in PDF units.
| PdfRect PdfPage::GetCropBox | ( | ) | const |
Get the current CropBox (visible page size) in PDF units.
Get an element from the pages resources dictionary, using a type (category) and a key.
| type | the type of resource to fetch (e.g. /Font, or /XObject) |
| key | the key of the resource |
Method for getting a value that can be inherited Possible names that can be inherited according to the PDF specification are: Resources, MediaBox, CropBox and Rotate
| PdfRect 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, the last page has the number PdfPageTree:GetTotalNumberOfPages()
|
overridevirtual |
Get the current canvas size in PDF Units
Implements mm::PdfCanvas.
| int PdfPage::GetRotationRaw | ( | ) | const |
Get the current page rotation (if any), it's a clockwise rotation
| PdfRect PdfPage::GetTrimBox | ( | ) | const |
Get the current TrimBox (cut area) in PDF units.
|
overridevirtual |
Get the current canvas rotation
| teta | counterclockwise rotation in radians |
Implements mm::PdfCanvas.
| void PdfPage::SetICCProfile | ( | const std::string_view & | csTag, |
| PdfInputStream & | 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 PdfRect & | size | ) |
Set the mediabox in PDF Units
| size | a PdfRect specifying the mediabox of the page (i.e the /TrimBox key) 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. |