Aspose::Pdf::PageNumberStamp Class Referencefinal

Represents page number stamp and used to number pages. More...

Inherits Aspose::Pdf::TextStamp.

Public Member Functions

System::String get_Format ()
 String value for stamping page numbers. Value must include char '#' which is replaced with the page number in the process of stamping. More...
 
void set_Format (System::String value)
 String value for stamping page numbers. Value must include char '#' which is replaced with the page number in the process of stamping. More...
 
int32_t get_StartingNumber ()
 Gets value of the number of starting page. Other pages will be numbered starting from this value. More...
 
void set_StartingNumber (int32_t value)
 Sets value of the number of starting page. Other pages will be numbered starting from this value. More...
 
Aspose::Pdf::NumberingStyle get_NumberingStyle ()
 Numbering style which used by this stamp. More...
 
void set_NumberingStyle (Aspose::Pdf::NumberingStyle value)
 Numbering style which used by this stamp. More...
 
 PageNumberStamp (System::String format)
 Initializes a new instance of the PageNumberStamp class. More...
 
virtual void Put (System::SharedPtr< Page > page)
 Adds page number. More...
 
 PageNumberStamp ()
 Initializes a new instance of the PageNumberStamp class. Format is set to "#". More...
 
 PageNumberStamp (System::SharedPtr< Facades::FormattedText > formattedText)
 Creates PageNumberStamp by formatted text. More...
 
- Public Member Functions inherited from Aspose::Pdf::TextStamp
bool get_Draw ()
 This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text. More...
 
void set_Draw (bool value)
 This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text. More...
 
bool get_TreatYIndentAsBaseLine ()
 Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text. More...
 
void set_TreatYIndentAsBaseLine (bool value)
 Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text. More...
 
bool get_WordWrap ()
 Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false. More...
 
void set_WordWrap (bool value)
 Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false. More...
 
bool get_Justify ()
 Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false. More...
 
void set_Justify (bool value)
 Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false. More...
 
bool get_Scale ()
 Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width. More...
 
void set_Scale (bool value)
 Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width. More...
 
System::String get_Value ()
 Gets string value which is used as stamp on the page. More...
 
void set_Value (System::String value)
 Sets string value which is used as stamp on the page. More...
 
System::SharedPtr< Aspose::Pdf::Text::TextStateget_TextState ()
 Gets text properties of the stamp. See TextState for details. More...
 
Aspose::Pdf::HorizontalAlignment get_TextAlignment ()
 Alignment of the text inside the stamp. More...
 
void set_TextAlignment (Aspose::Pdf::HorizontalAlignment value)
 Alignment of the text inside the stamp. More...
 
virtual double get_Width ()
 Desired width of the stamp on the page. More...
 
virtual void set_Width (double value)
 Desired width of the stamp on the page. More...
 
virtual double get_Height ()
 Desired height of the stamp on the page. More...
 
virtual void set_Height (double value)
 Desired height of the stamp on the page. More...
 
double get_MaxRowWidth ()
 Max row height for WordWrap option. More...
 
void set_MaxRowWidth (double value)
 Max row height for WordWrap option. More...
 
 TextStamp (System::String value)
 Initializes a new instance of the TextStamp class. More...
 
 TextStamp (System::String value, System::SharedPtr< Aspose::Pdf::Text::TextState > textState)
 Initializes a new instance of the TextStamp class. More...
 
 TextStamp (System::SharedPtr< Facades::FormattedText > formattedText)
 Initializes a new instance of the TextStamp class with formattedText object More...
 
- Public Member Functions inherited from Aspose::Pdf::Stamp
bool get_Background ()
 Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top. More...
 
void set_Background (bool value)
 Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top. More...
 
double get_Opacity ()
 Gets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0. More...
 
void set_Opacity (double value)
 Sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0. More...
 
double get_OutlineOpacity ()
 Gets a value to indicate the stamp outline opacity. The value is from 0.0 to 1.0. By default the value is 1.0. More...
 
void set_OutlineOpacity (double value)
 Sets a value to indicate the stamp outline opacity. The value is from 0.0 to 1.0. By default the value is 1.0. More...
 
double get_OutlineWidth ()
 Gets a value of the stamp outline width. By default the value is 1.0. More...
 
void set_OutlineWidth (double value)
 Sets a value of the stamp outline width. By default the value is 1.0. More...
 
Rotation get_Rotate ()
 Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None. More...
 
void set_Rotate (Rotation value)
 Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None. More...
 
double get_XIndent ()
 Horizontal stamp coordinate, starting from the left. More...
 
void set_XIndent (double value)
 Horizontal stamp coordinate, starting from the left. More...
 
double get_YIndent ()
 Vertical stamp coordinate, starting from the bottom. More...
 
void set_YIndent (double value)
 Vertical stamp coordinate, starting from the bottom. More...
 
Aspose::Pdf::HorizontalAlignment get_HorizontalAlignment ()
 Gets Horizontal alignment of stamp on the page. More...
 
void set_HorizontalAlignment (Aspose::Pdf::HorizontalAlignment value)
 Sets Horizontal alignment of stamp on the page. More...
 
Aspose::Pdf::VerticalAlignment get_VerticalAlignment ()
 Gets vertical alignment of stamp on page. More...
 
void set_VerticalAlignment (Aspose::Pdf::VerticalAlignment value)
 Sets vertical alignment of stamp on page. More...
 
double get_LeftMargin ()
 Gets left margin of stamp. More...
 
void set_LeftMargin (double value)
 Sets left margin of stamp. More...
 
double get_RightMargin ()
 Gets right margin of stamp. More...
 
void set_RightMargin (double value)
 Sets right margin of stamp. More...
 
double get_BottomMargin ()
 Gets bottom margin of stamp. More...
 
void set_BottomMargin (double value)
 Sets bottom margin of stamp. More...
 
double get_TopMargin ()
 Gets top margin of stamp. More...
 
void set_TopMargin (double value)
 Sets top margin of stamp. More...
 
double get_ZoomX ()
 Horizontal zooming factor of the stamp. Allows to scale stamp horizontally. More...
 
void set_ZoomX (double value)
 Horizontal zooming factor of the stamp. Allows to scale stamp horizontally. More...
 
double get_ZoomY ()
 Vertical zooming factor of the stamp. Allows to scale stamp vertically. More...
 
void set_ZoomY (double value)
 Vertical zooming factor of the stamp. Allows to scale stamp vertically. More...
 
double get_Zoom ()
 Zooming factor of the stamp. Allows to scale stamp. Please note that pair of properties ZoomX and ZoomY allows to set zoom factor for every axe separately. Setting of this property changes both ZoomX and ZoomY properties. If ZoomX and ZoomY are different then Zoom property returns ZoomX value. More...
 
void set_Zoom (double value)
 Zooming factor of the stamp. Allows to scale stamp. Please note that pair of properties ZoomX and ZoomY allows to set zoom factor for every axe separately. Setting of this property changes both ZoomX and ZoomY properties. If ZoomX and ZoomY are different then Zoom property returns ZoomX value. More...
 
double get_RotateAngle ()
 Gets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle. More...
 
void set_RotateAngle (double value)
 Sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle. More...
 
void setStampId (int32_t value)
 Sets stamp Id. More...
 
int32_t getStampId ()
 Returns stamp ID. More...
 
 Stamp ()
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
- Protected Member Functions inherited from Aspose::Pdf::TextStamp
virtual void ClearCache ()
 
virtual System::SharedPtr< RectanglegetRect ()
 Returns position and size of text stamp. More...
 
virtual System::SharedPtr< XFormcreateXForm (System::SharedPtr< Page > page)
 Creates XForm which contains operators for text output. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Stamp
System::SharedPtr< PointgetPoint (System::SharedPtr< Page > page)
 Returns point if the stamp on the page. More...
 
void UpdateCache (System::SharedPtr< Document > doc)
 This method checks document to which stamp is applied. If the document was changed then cached objects (for example Form XObject, Image, graphic state etc) Are cleared. This is made to avoid document damage (see for example 36049) More...
 
System::SharedPtr< Engine::Data::IPdfDictionary > GetParentResources (System::SharedPtr< Engine::Data::IPdfDictionary > dict)
 
System::SharedPtr< Engine::Data::IPdfDictionary > GetResources (System::SharedPtr< Page > page)
 
System::String addExtGState (System::SharedPtr< Page > page)
 Add G state on the page for stamp. More...
 
virtual System::SharedPtr< MatrixgetMatrix (System::SharedPtr< Page > page)
 Calculates matrix of the stamp More...
 
virtual System::SharedPtr< MatrixgetStampRotationMatrix ()
 Retuns matrix which used for rotation the stamp; More...
 
virtual System::SharedPtr< MatrixgetPageRotationMatrix (System::SharedPtr< Page > page)
 Returns transformation matrix for page. More...
 
virtual System::SharedPtr< MatrixgetScaleMatrix ()
 Returns scaling matrix of the stamp. More...
 
virtual System::SharedPtr< MatrixgetSizeMatrix ()
 This matrix used in CM operator; it's must be different for Image Stamp More...
 
virtual void drawStampOnPage (System::SharedPtr< Page > page, System::String name)
 Write operators for showing stamp to the page contents. More...
 
void updateStampId (System::SharedPtr< Engine::Data::IPdfPrimitive > instance)
 
- Static Protected Member Functions inherited from Aspose::Pdf::TextStamp
static System::SharedPtr< Aspose::Pdf::Text::Fontget_DefaultFont ()
 
- Protected Attributes inherited from Aspose::Pdf::TextStamp
Aspose::Pdf::HorizontalAlignment _textAlignemnt
 
- Protected Attributes inherited from Aspose::Pdf::Stamp
Aspose::Pdf::HorizontalAlignment _horizontalAlignment
 
Aspose::Pdf::VerticalAlignment _verticalAlignment
 
- Static Protected Attributes inherited from Aspose::Pdf::TextStamp
static float DefaultFontSize
 

Detailed Description

Represents page number stamp and used to number pages.

Constructor & Destructor Documentation

◆ PageNumberStamp() [1/3]

Aspose::Pdf::PageNumberStamp::PageNumberStamp ( System::String  format)

Initializes a new instance of the PageNumberStamp class.

Parameters
formatString value used for stamping. See Format property for details.

◆ PageNumberStamp() [2/3]

Aspose::Pdf::PageNumberStamp::PageNumberStamp ( )

Initializes a new instance of the PageNumberStamp class. Format is set to "#".

◆ PageNumberStamp() [3/3]

Aspose::Pdf::PageNumberStamp::PageNumberStamp ( System::SharedPtr< Facades::FormattedText formattedText)

Creates PageNumberStamp by formatted text.

Parameters
formattedTextFormatted text which used to create Page Number Stamp.

Member Function Documentation

◆ get_Format()

System::String Aspose::Pdf::PageNumberStamp::get_Format ( )

String value for stamping page numbers. Value must include char '#' which is replaced with the page number in the process of stamping.

◆ get_NumberingStyle()

Aspose::Pdf::NumberingStyle Aspose::Pdf::PageNumberStamp::get_NumberingStyle ( )

Numbering style which used by this stamp.

◆ get_StartingNumber()

int32_t Aspose::Pdf::PageNumberStamp::get_StartingNumber ( )

Gets value of the number of starting page. Other pages will be numbered starting from this value.

◆ Put()

virtual void Aspose::Pdf::PageNumberStamp::Put ( System::SharedPtr< Page page)
virtual

Adds page number.

Parameters
pagePage for stamping.

Reimplemented from Aspose::Pdf::TextStamp.

◆ set_Format()

void Aspose::Pdf::PageNumberStamp::set_Format ( System::String  value)

String value for stamping page numbers. Value must include char '#' which is replaced with the page number in the process of stamping.

◆ set_NumberingStyle()

void Aspose::Pdf::PageNumberStamp::set_NumberingStyle ( Aspose::Pdf::NumberingStyle  value)

Numbering style which used by this stamp.

◆ set_StartingNumber()

void Aspose::Pdf::PageNumberStamp::set_StartingNumber ( int32_t  value)

Sets value of the number of starting page. Other pages will be numbered starting from this value.