Aspose::Pdf::Page class

Page class

Class representing page of PDF document.

class Page : public System::IDisposable,
             public Aspose::Pdf::ISupportsMemoryCleanup,
             public Aspose::Pdf::IOperatorContainer

Methods

MethodDescription
Accept(System::SharedPtr<Annotations::AnnotationSelector>)Accepts AnnotationSelector visitor object that provides functionality to work with annotations.
Accept(System::SharedPtr<Text::TextFragmentAbsorber>)Accepts TextFragmentAbsorber visitor object that provides functionality to work with text objects.
Accept(System::SharedPtr<ImagePlacementAbsorber>)Accepts ImagePlacementAbsorber visitor object that provides functionality to work with image placement objects.
Accept(System::SharedPtr<Text::TextAbsorber>)Accepts TextAbsorber visitor object that provides functionality to work with text objects.
AddGraphics(System::SharedPtr<Vector::GraphicElementCollection>, System::SharedPtr<Aspose::Pdf::Rectangle>)Adds graphics to the page. Works faster than adding elements one by one with GraphicElement::AddOnPage(Page) method.
AddImage(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Aspose::Pdf::Rectangle>)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(System::String, System::SharedPtr<System::IO::Stream>, System::SharedPtr<Aspose::Pdf::Rectangle>)Adds searchable image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Aspose::Pdf::Rectangle>, int32_t, int32_t, bool)Adds image on page and places it depend on image rectangle position.
AddImage(System::String, System::SharedPtr<Aspose::Pdf::Rectangle>)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddStamp(System::SharedPtr<Stamp>)Put stamp into page. Stamp can be page number, image or simple text, e.g. some logo.
AsByteArray(System::SharedPtr<Devices::Resolution>)Converts current page as bitmap and than returns array of bytes.
AsXml()Converts current page as xml in utf8 encoding.
CalculateContentBBox()Calculates bbox value - rectangle containing contents without visible margins.
ConvertToPNGMemoryStream()Convert page to PNG for DSR, OMR, OCR image stream.
DeleteGraphics(System::SharedPtr<Vector::GraphicElementCollection>)Deletes graphics from the page. Works faster than deleting elements one by one with GraphicElement::Remove method.
Dispose() overrideFrees up memory.
Flatten()Removes all fields located on the page and place their values instead.
FreeMemory() overrideClears cached data.
get_Actions()Gets collection of page properties.
get_Annotations()Gets collection of page annotations. Annotations
get_ArtBox()Gets art box of the page.
get_Artifacts()Gets collection of artifacts on the page.
get_Background()Gets the background color of the page.
get_BackgroundImage() constGets background image for page (for generator only, not filled in when reading document).
get_BleedBox()Gets bleed box of the page.
get_ColorType()Sets color type of the pages based on information getting from operators SetColor, images and forms.
get_Contents() overrideGets collection of operators in the content stream of the page. OperatorCollection
get_CropBox()Gets crop box of the page.
get_Duration()Gets of set page display duration. This is time in seconds that page shall be displayed during presentation. Returns -1 if duration is not defined.
get_FieldsInTabOrder()Gets list of Field object in Tab order on this page.
get_Footer() constGets page footer.
get_Group()Gets a group attributes class specifying the attributes of the page’s page group for use in the transparent imaging model.
get_Header() constGets page header.
get_IsAddParagraphsAfterLast() constGets the addition of paragraphs after the last paragraph of the page.
get_Layers()Gets layers collection.
get_MediaBox()Gets media box of the page.
get_NoteLineStyle()Gets the line style for notes.(for generator only, not filled in when reading document)
get_Number()Get number of the page.
get_PageInfo()Gets the page info (for generator only, not filled in when reading document).
get_Paragraphs()Gets the paragraphs.
get_Rect()Gets rectangle of the page. For get: page crop box is returned if specified, otherwise page media box is returned. For set: page media box always set. Please note that this property don’t consider page rotation. To get page rectangle considering rotation please use ActualRect.
get_Resources() overrideGets page resources. Resources object contains collections of images, forms and fonts. Resources
get_Rotate()Gets rotation of the page.
get_RotationMatrix()Gets transofmation matrix for the page.
get_TabOrder()Gets tab order of the page. Possible values: Row, Column. Default, Manual.
get_TocInfo() constGets table of contents info.
get_TrimBox()Gets trim box of the page.
get_UserUnit()Gets UserUnit value. A positive number giving the size of default user space units, in multiples of 1 / 72 inch. Default value is 1. Please set zero or negative value in order to clear this entry in page.
get_Watermark()Gets the watermark of the page.
GetNotifications()Returns notifications about inside operations with page content. (Only notifications about paragraph events in text adding scenarios are supported now.)
GetPageRect(bool)Returns rectangle of the page according to its CropBox (or MediaBox if CropBox null).
HasVectorGraphics()Detect of the presence of vector graphics, if it is present on the page.
static IntToRotation(int32_t)Translates integer value into corresponding rotation enumeration member.
IsBlank(double)Gets the flag whether page is blank or not.
MakeGrayscale()Converts the page to grayscale.
MergeLayers(System::String)Merges all layers on the page into a single layer with the specified new layer name.
MergeLayers(System::String, System::String)Merges all layers on the page into a single layer with the specified new layer name and optional content group Id.
Resize(System::SharedPtr<PageSize>)Resizes the page.
static RotationToInt(Rotation)Translates rotation enumeration member into integer value.
SendTo(System::SharedPtr<Devices::PageDevice>, System::SharedPtr<System::IO::Stream>)Sends page to process with given page device.
SendTo(System::SharedPtr<Devices::PageDevice>, System::String)Sends page to process with given page device.
set_ArtBox(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets art box of the page.
set_Background(System::SharedPtr<Color>)Sets the background color of the page.
set_BackgroundImage(System::SharedPtr<Image>)Sets background image for page (for generator only, not filled in when reading document).
set_BleedBox(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets bleed box of the page.
set_CropBox(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets crop box of the page.
set_Duration(double)Gets of set page display duration. This is time in seconds that page shall be displayed during presentation. Returns -1 if duration is not defined.
set_Footer(System::SharedPtr<HeaderFooter>)Sets page footer.
set_Group(System::SharedPtr<Aspose::Pdf::Group>)Sets a group attributes class specifying the attributes of the page’s page group for use in the transparent imaging model.
set_Header(System::SharedPtr<HeaderFooter>)Sets page header.
set_IsAddParagraphsAfterLast(bool)Sets the addition of paragraphs after the last paragraph of the page.
set_Layers(System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Layer>>>)Sets layers collection.
set_MediaBox(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets media box of the page.
set_NoteLineStyle(System::SharedPtr<GraphInfo>)Sets the line style for notes.(for generator only, not filled in when reading document)
set_PageInfo(System::SharedPtr<Aspose::Pdf::PageInfo>)Sets the page info (for generator only, not filled in when reading document).
set_Paragraphs(System::SharedPtr<Aspose::Pdf::Paragraphs>)Gets the paragraphs.
set_Rect(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets rectangle of the page. For get: page crop box is returned if specified, otherwise page media box is returned. For set: page media box always set. Please note that this property don’t consider page rotation. To get page rectangle considering rotation please use ActualRect.
set_Rotate(Rotation)Sets rotation of the page.
set_TabOrder(Aspose::Pdf::TabOrder)Sets tab order of the page. Possible values: Row, Column. Default, Manual.
set_TocInfo(System::SharedPtr<Aspose::Pdf::TocInfo>)Sets table of contents info.
set_TrimBox(System::SharedPtr<Aspose::Pdf::Rectangle>)Sets trim box of the page.
set_UserUnit(double)Sets UserUnit value. A positive number giving the size of default user space units, in multiples of 1 / 72 inch. Default value is 1. Please set zero or negative value in order to clear this entry in page.
set_Watermark(System::SharedPtr<Aspose::Pdf::Watermark>)Sets the watermark of the page.
SetPageSize(double, double)Sets page size for page.
TrySaveVectorGraphics(System::String)Tries to save vector graphics if they are present on the page. The save format is SVG.

Typedefs

TypedefDescription
BeforePageGenerateProcedure for customize header and footer.

See Also