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(const System::SharedPtr<Aspose::Pdf::Annotations::AnnotationSelector>&)Accepts AnnotationSelector visitor object that provides functionality to work with annotations.
Accept(const System::SharedPtr<Aspose::Pdf::Text::TextFragmentAbsorber>&)Accepts TextFragmentAbsorber visitor object that provides functionality to work with text objects.
Accept(const System::SharedPtr<Aspose::Pdf::ImagePlacementAbsorber>&)Accepts ImagePlacementAbsorber visitor object that provides functionality to work with image placement objects.
Accept(const System::SharedPtr<Aspose::Pdf::Text::TextAbsorber>&)Accepts TextAbsorber visitor object that provides functionality to work with text objects.
AddGraphics(const System::SharedPtr<Aspose::Pdf::Vector::GraphicElementCollection>&, const System::SharedPtr<Aspose::Pdf::Rectangle>&)Adds graphics to the page. Works faster than adding elements one by one with GraphicElement::AddOnPage(Page) method.
AddImage(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Pdf::Rectangle>&, const System::SharedPtr<Aspose::Pdf::Rectangle>&, bool)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(const System::String&, const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Pdf::Rectangle>&, const 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(const System::SharedPtr<System::IO::Stream>&, System::SharedPtr<Aspose::Pdf::Rectangle>, int32_t, int32_t, bool, const System::SharedPtr<Aspose::Pdf::Rectangle>&)Adds image on page and places it depend on image rectangle position.
AddImage(const System::String&, const System::SharedPtr<Aspose::Pdf::Rectangle>&)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddStamp(const System::SharedPtr<Aspose::Pdf::Stamp>&)Put stamp into page. Stamp can be page number, image or simple text, e.g. some logo.
AsByteArray(const System::SharedPtr<Aspose::Pdf::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(const System::SharedPtr<Aspose::Pdf::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).
GetResources() overrideRetrieves the resources associated with the page.
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(const System::String&)Merges all layers on the page into a single layer with the specified new layer name.
MergeLayers(const System::String&, const 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<Aspose::Pdf::PageSize>)Resizes the page.
static RotationToInt(Aspose::Pdf::Rotation)Translates rotation enumeration member into integer value.
SendTo(const System::SharedPtr<Aspose::Pdf::Devices::PageDevice>&, const System::SharedPtr<System::IO::Stream>&)Sends page to process with given page device.
SendTo(const System::SharedPtr<Aspose::Pdf::Devices::PageDevice>&, const System::String&)Sends page to process with given page device.
set_ArtBox(const System::SharedPtr<Aspose::Pdf::Rectangle>&)Sets art box of the page.
set_Background(const System::SharedPtr<Aspose::Pdf::Color>&)Sets the background color of the page.
set_BackgroundImage(const System::SharedPtr<Aspose::Pdf::Image>&)Sets background image for page (for generator only, not filled in when reading document).
set_BleedBox(const System::SharedPtr<Aspose::Pdf::Rectangle>&)Sets bleed box of the page.
set_CropBox(const 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(const System::SharedPtr<Aspose::Pdf::HeaderFooter>&)Sets page footer.
set_Group(const 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(const System::SharedPtr<Aspose::Pdf::HeaderFooter>&)Sets page header.
set_IsAddParagraphsAfterLast(bool)Sets the addition of paragraphs after the last paragraph of the page.
set_Layers(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Aspose::Pdf::Layer>>>&)Sets layers collection.
set_MediaBox(const System::SharedPtr<Aspose::Pdf::Rectangle>&)Sets media box of the page.
set_NoteLineStyle(const System::SharedPtr<Aspose::Pdf::GraphInfo>&)Sets the line style for notes.(for generator only, not filled in when reading document)
set_PageInfo(const System::SharedPtr<Aspose::Pdf::PageInfo>&)Sets the page info (for generator only, not filled in when reading document).
set_Paragraphs(const System::SharedPtr<Aspose::Pdf::Paragraphs>&)Gets the paragraphs.
set_Rect(const 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(Aspose::Pdf::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(const System::SharedPtr<Aspose::Pdf::TocInfo>&)Sets table of contents info.
set_TrimBox(const 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(const System::SharedPtr<Aspose::Pdf::Watermark>&)Sets the watermark of the page.
SetPageSize(double, double)Sets page size for page.
TrySaveVectorGraphics(const 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