Aspose::Pdf::Facades::PdfFileStamp class

PdfFileStamp class

Class for adding stamps (watermark or background) to PDF files.

class PdfFileStamp : public Aspose::Pdf::Facades::SaveableFacade

Methods

MethodDescription
AddFooter(System::SharedPtr<FormattedText>, float)Adds footer to the pages of the document.
AddFooter(System::SharedPtr<FormattedText>, float, float, float)Adds footer to the pages of the document.
AddFooter(System::String, float)Adds image as footer to the pages of the document.
AddFooter(System::String, float, float, float)Adds image as footer of the pages.
AddFooter(System::SharedPtr<System::IO::Stream>, float)Adds image as footer of the page.
AddFooter(System::SharedPtr<System::IO::Stream>, float, float, float)Adds image as footer of the page.
AddHeader(System::SharedPtr<FormattedText>, float)Adds header to the page.
AddHeader(System::SharedPtr<FormattedText>, float, float, float)Adds header to the pages of file.
AddHeader(System::String, float)Adds image as header to the pages of the file.
AddHeader(System::String, float, float, float)Adds image as header on the pages.
AddHeader(System::SharedPtr<System::IO::Stream>, float)Adds image as header on the pages.
AddHeader(System::SharedPtr<System::IO::Stream>, float, float, float)Adds image at the top of the page.
AddPageNumber(System::String)Add page number to file. Page number text may contain # sign which will be replaced with number of the page. Page number is placed in the bottom of the page centered horizontally.
AddPageNumber(System::SharedPtr<FormattedText>)Adds page number to the page. Page number may contain # sign which will be replaced with page number. Page number is placed in the bottom of the page centered horizontally.
AddPageNumber(System::String, int32_t, float, float, float, float)Adds page number to the pages of document.
AddPageNumber(System::String, float, float)Adds page number at the specified position on the page.
AddPageNumber(System::SharedPtr<FormattedText>, int32_t, float, float, float, float)Adds page number to the pages of document.
AddPageNumber(System::SharedPtr<FormattedText>, float, float)Adds page number at the specified position on the page.
AddPageNumber(System::String, int32_t)Adds page number to the pages.
AddPageNumber(System::SharedPtr<FormattedText>, int32_t)Adds page number to the pages.
AddStamp(System::SharedPtr<Stamp>)Adds stamp to the file.
Close() overrideCloses opened files and saves changes. Warning. If input or output streams are specified they are not closed by Close() method.
get_AttachmentName() constGets name of attachment when result of operation is stored into HttpResponse objects as attachment.
get_ContentDisposition() constGets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
get_InputFile() constGets name and path of input file.
get_InputStream() constGets input stream.
get_KeepSecurity() constKeeps security if true. (This feature will be implemented in next versions).
get_NumberingStyle() constGets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase.
get_OptimizeSize() constGets optimization flag. Equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.
get_OutputFile() constGets name and path of output file.
get_OutputStream() constGets output stream.
get_PageHeight()Gets height of first page in souorce file.
get_PageNumberRotation()Gets rotation of page number. Rotation is in degrees. Default is 0.
get_PageWidth()Gets width of first page in input file.
get_Response() constGets Response object where result of operation will be stored.
get_SaveOptions() constGets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
get_StampId() constStamp ID of next added stamp (incluiding page headers/hooters/page numbers).
get_StartingNumber() constGets starting number for first page in input file. Next pages will be numbered starting from this value. For example if StartingNumber is set to 100, document pages will have numbers 100, 101, 102…
PdfFileStamp(System::String, System::String)Constructor for PdfFileStamp.
PdfFileStamp(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::IO::Stream>)Constructor for PdfFileStamp.
PdfFileStamp(System::String, System::String, bool)Constructor for PdfFileStamp.
PdfFileStamp(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::IO::Stream>, bool)Constructor of PdfFileStamp.
PdfFileStamp()Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp(System::SharedPtr<Aspose::Pdf::Document>)Initializes new PdfFileStamp object on base of the document .
PdfFileStamp(System::SharedPtr<Aspose::Pdf::Document>, System::String)Initializes new PdfFileStamp object on base of the document .
PdfFileStamp(System::SharedPtr<Aspose::Pdf::Document>, System::SharedPtr<System::IO::Stream>)Initializes new PdfFileStamp object on base of the document .
PdfFileStamp(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::Web::HttpResponse>)Creates PdfFileStamp which will save result into HttpResponse object.
PdfFileStamp(System::String, System::SharedPtr<System::Web::HttpResponse>)Creates PdfFileStamp which will save result into HttpResponse object.
Save(System::String) overrideSaves result into specified file.
Save(System::SharedPtr<System::IO::Stream>) overrideSaves document into specified stream.
set_AttachmentName(System::String)Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
set_ContentDisposition(Aspose::Pdf::ContentDisposition)Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
set_ConvertTo(PdfFormat)Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion.
set_InputFile(System::String)Sets name and path of input file.
set_InputStream(System::SharedPtr<System::IO::Stream>)Sets input stream.
set_KeepSecurity(bool)Keeps security if true. (This feature will be implemented in next versions).
set_NumberingStyle(Aspose::Pdf::NumberingStyle)Sets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase.
set_OptimizeSize(bool)Sets optimization flag. Equal resource streams in resultant file are merged into one PDF object if this flag set. This allows to decrease resultant file size but may cause slower execution and larger memory requirements. Default value: false.
set_OutputFile(System::String)Sets name and path of output file.
set_OutputStream(System::SharedPtr<System::IO::Stream>)Sets output stream.
set_PageNumberRotation(float)Sets rotation of page number. Rotation is in degrees. Default is 0.
set_Response(System::SharedPtr<System::Web::HttpResponse>)Sets Response object where result of operation will be stored.
set_SaveOptions(System::SharedPtr<Aspose::Pdf::SaveOptions>)Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
set_StampId(int32_t)Stamp ID of next added stamp (incluiding page headers/hooters/page numbers).
set_StartingNumber(int32_t)Sets starting number for first page in input file. Next pages will be numbered starting from this value. For example if StartingNumber is set to 100, document pages will have numbers 100, 101, 102…

Fields

FieldDescription
static PosBottomLeftBottom left position.
static PosBottomMiddleBottom middle position.
static PosBottomRightBottom right position.
static PosSidesLeftLeft position.
static PosSidesRightRight position.
static PosUpperLeftUpper let position.
static PosUpperMiddleUpper middle position.
static PosUpperRightRight upper position.

See Also