Aspose::Pdf::Facades::Stamp Class Referencefinal

Class represeting stamp. More...

#include "Stamp.h"

Inherits System::Object.

Public Member Functions

ASPOSE_PDF_SHARED_API int32_t get_StampId () const
 Gets identifier of stamp. More...
 
ASPOSE_PDF_SHARED_API void set_StampId (int32_t value)
 Sets identifier of stamp. More...
 
ASPOSE_PDF_SHARED_API int32_t get_Quality () const
 Gets quality of image stamp in percent. Valiued values 0..100%. More...
 
ASPOSE_PDF_SHARED_API void set_Quality (int32_t value)
 Sets quality of image stamp in percent. Valiued values 0..100%. More...
 
ASPOSE_PDF_SHARED_API float get_Opacity ()
 Gets opacity of the stamp. More...
 
ASPOSE_PDF_SHARED_API void set_Opacity (float value)
 Sets opacity of the stamp. More...
 
ASPOSE_PDF_SHARED_API int32_t get_PageNumber () const
 Gets page number. More...
 
ASPOSE_PDF_SHARED_API void set_PageNumber (int32_t value)
 Sets page number. More...
 
ASPOSE_PDF_SHARED_API System::ArrayPtr< int32_t > get_Pages () const
 Gets array with numbers of pages which will be affected by stamp. If Pages = null all pages of the document are affected. More...
 
ASPOSE_PDF_SHARED_API void set_Pages (System::ArrayPtr< int32_t > value)
 Sets array with numbers of pages which will be affected by stamp. If Pages = null all pages of the document are affected. More...
 
ASPOSE_PDF_SHARED_API float get_Rotation () const
 Gets rotation of the stamp in degrees. More...
 
ASPOSE_PDF_SHARED_API void set_Rotation (float value)
 Sets rotation of the stamp in degrees. More...
 
ASPOSE_PDF_SHARED_API bool get_IsBackground () const
 Gets background status. If true stamp will be placed as background of the spamped page. By default is set to false. More...
 
ASPOSE_PDF_SHARED_API void set_IsBackground (bool value)
 Sets background status. If true stamp will be placed as background of the spamped page. By default is set to false. More...
 
ASPOSE_PDF_SHARED_API BlendingColorSpace get_BlendingSpace () const
 Gets a BlendingColorSpace value that defines a color space that is used to perform transparency and blending operations on the page. More...
 
ASPOSE_PDF_SHARED_API void set_BlendingSpace (BlendingColorSpace value)
 Sets a BlendingColorSpace value that defines a color space that is used to perform transparency and blending operations on the page. More...
 
ASPOSE_PDF_SHARED_API Stamp ()
 Constructor for Stamp object. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::String pdfFile, int32_t pageNumber)
 Sets PDF file and number of page which will be used as stamp. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > pdfStream, int32_t pageNumber)
 Sets PDF file and number of page which will be used as stamp. More...
 
ASPOSE_PDF_SHARED_API void BindImage (System::String imageFile)
 Sets image as a stamp. More...
 
ASPOSE_PDF_SHARED_API void BindLogo (System::SharedPtr< FormattedText > formattedText)
 Sets text as stamp. More...
 
ASPOSE_PDF_SHARED_API void BindTextState (System::SharedPtr< Aspose::Pdf::Text::TextState > textState)
 Sets text state of stamp text. More...
 
ASPOSE_PDF_SHARED_API void SetOrigin (float originX, float originY)
 Sets position on page where stamp will be placed. More...
 
ASPOSE_PDF_SHARED_API void SetImageSize (float width, float height)
 Sets size of image stamp. Image will be scaled according to the specified values. More...
 
ASPOSE_PDF_SHARED_API void BindImage (System::SharedPtr< System::IO::Stream > image)
 Sets image which will be used as stamp. More...
 
- 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 reference 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 int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () 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 (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

System::SharedPtr< Aspose::Pdf::Stamptranslate ()
 Translates Stamp into corresponding Aspose.Pdf.Stamp descendant (TextStamp / ImageStamp / PdfPageStamp ) More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. 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 ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Class represeting stamp.

Constructor & Destructor Documentation

◆ Stamp()

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Stamp::Stamp ( )

Constructor for Stamp object.

Member Function Documentation

◆ BindImage() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindImage ( System::String  imageFile)

Sets image as a stamp.

Parameters
imageFileImage file name and path.

◆ BindImage() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindImage ( System::SharedPtr< System::IO::Stream image)

Sets image which will be used as stamp.

Parameters
imageStream which contains image data.

◆ BindLogo()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindLogo ( System::SharedPtr< FormattedText formattedText)

Sets text as stamp.

Parameters
formattedTextFormattedText object which specifies text and text properties.

◆ BindPdf() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindPdf ( System::String  pdfFile,
int32_t  pageNumber 
)

Sets PDF file and number of page which will be used as stamp.

Parameters
pdfFilePath to PDF file.
pageNumberNumber of page in PDF file

◆ BindPdf() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindPdf ( System::SharedPtr< System::IO::Stream pdfStream,
int32_t  pageNumber 
)

Sets PDF file and number of page which will be used as stamp.

Parameters
pdfStreamStream which contains PDF document.
pageNumberPage index of the document whihc will be used as stamp.

◆ BindTextState()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::BindTextState ( System::SharedPtr< Aspose::Pdf::Text::TextState textState)

Sets text state of stamp text.

Parameters
textStateTextState object which specifies text properties.

◆ get_BlendingSpace()

ASPOSE_PDF_SHARED_API BlendingColorSpace Aspose::Pdf::Facades::Stamp::get_BlendingSpace ( ) const

Gets a BlendingColorSpace value that defines a color space that is used to perform transparency and blending operations on the page.

◆ get_IsBackground()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Stamp::get_IsBackground ( ) const

Gets background status. If true stamp will be placed as background of the spamped page. By default is set to false.

///

◆ get_Opacity()

ASPOSE_PDF_SHARED_API float Aspose::Pdf::Facades::Stamp::get_Opacity ( )

Gets opacity of the stamp.

◆ get_PageNumber()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Facades::Stamp::get_PageNumber ( ) const

Gets page number.

◆ get_Pages()

ASPOSE_PDF_SHARED_API System::ArrayPtr<int32_t> Aspose::Pdf::Facades::Stamp::get_Pages ( ) const

Gets array with numbers of pages which will be affected by stamp. If Pages = null all pages of the document are affected.

◆ get_Quality()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Facades::Stamp::get_Quality ( ) const

Gets quality of image stamp in percent. Valiued values 0..100%.

◆ get_Rotation()

ASPOSE_PDF_SHARED_API float Aspose::Pdf::Facades::Stamp::get_Rotation ( ) const

Gets rotation of the stamp in degrees.

◆ get_StampId()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Facades::Stamp::get_StampId ( ) const

Gets identifier of stamp.

◆ set_BlendingSpace()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_BlendingSpace ( BlendingColorSpace  value)

Sets a BlendingColorSpace value that defines a color space that is used to perform transparency and blending operations on the page.

◆ set_IsBackground()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_IsBackground ( bool  value)

Sets background status. If true stamp will be placed as background of the spamped page. By default is set to false.

///

◆ set_Opacity()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_Opacity ( float  value)

Sets opacity of the stamp.

◆ set_PageNumber()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_PageNumber ( int32_t  value)

Sets page number.

◆ set_Pages()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_Pages ( System::ArrayPtr< int32_t >  value)

Sets array with numbers of pages which will be affected by stamp. If Pages = null all pages of the document are affected.

◆ set_Quality()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_Quality ( int32_t  value)

Sets quality of image stamp in percent. Valiued values 0..100%.

◆ set_Rotation()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_Rotation ( float  value)

Sets rotation of the stamp in degrees.

◆ set_StampId()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::set_StampId ( int32_t  value)

Sets identifier of stamp.

◆ SetImageSize()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::SetImageSize ( float  width,
float  height 
)

Sets size of image stamp. Image will be scaled according to the specified values.

Parameters
widthImage width.
heightImage height.

◆ SetOrigin()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Stamp::SetOrigin ( float  originX,
float  originY 
)

Sets position on page where stamp will be placed.

Parameters
originXX coordinate of the stamp.
originYY coordinate of the stamp.

◆ translate()

System::SharedPtr<Aspose::Pdf::Stamp> Aspose::Pdf::Facades::Stamp::translate ( )
protected

Translates Stamp into corresponding Aspose.Pdf.Stamp descendant (TextStamp / ImageStamp / PdfPageStamp )

Returns