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

Namespace: Aspose.Pdf.Facades
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 20.3
Syntax
public sealed class PdfFileStamp : SaveableFacade

The PdfFileStamp type exposes the following members.

Constructors
  NameDescription
Public methodCode examplePdfFileStamp
Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
Examples
C#
PdfFileStamp fileStamp = new PdfFileStamp();
fileStamp.InputFile = "input.pdf";
fileStamp.OutputFile = "output.pdf";
Public methodPdfFileStamp(Document)
Initializes new PdfFileStamp object on base of the document.
Public methodCode examplePdfFileStamp(Stream, Stream) Obsolete.
Constructor for PdfFileStamp.
Public methodPdfFileStamp(Stream, HttpResponse) Obsolete.
Creates PdfFileStamp which will save result into HttpResponse object.
Public methodCode examplePdfFileStamp(String, String) Obsolete.
Constructor for PdfFileStamp.
Public methodPdfFileStamp(String, HttpResponse) Obsolete.
Creates PdfFileStamp which will save result into HttpResponse object.
Public methodPdfFileStamp(Document, Stream) Obsolete.
Initializes new PdfFileStamp object on base of the document.
Public methodPdfFileStamp(Document, String) Obsolete.
Initializes new PdfFileStamp object on base of the document.
Public methodPdfFileStamp(Stream, Stream, Boolean) Obsolete.
Constructor of PdfFileStamp.
Public methodPdfFileStamp(String, String, Boolean) Obsolete.
Constructor for PdfFileStamp.
Properties
  NameDescription
Public propertyAttachmentName
Gets or sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
Public propertyContentDisposition
Gets or sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
Public propertyConvertTo
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.
Public propertyDocument
Gets the document facade is working on.
(Inherited from Facade.)
Public propertyInputFile Obsolete.
Gets or sets name and path of input file.
Public propertyInputStream Obsolete.
Gets or sets input stream.
Public propertyKeepSecurity
Keeps security if true. (This feature will be implemented in next versions).
Public propertyNumberingStyle
Gets or sets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase
Public propertyOptimizeSize
Gets or 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.
Public propertyOutputFile Obsolete.
Gets or sets name and path of output file.
Public propertyOutputStream Obsolete.
Gets or sets output stream.
Public propertyCode examplePageHeight
Gets height of first page in souorce file.
Public propertyPageNumberRotation
Gets or sets rotation of page number. Rotation is in degrees. Default is 0.
Public propertyCode examplePageWidth
Gets width of first page in input file.
Public propertyResponse
Gets or sets Response object where result of operation will be stored.
Public propertySaveOptions
Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
Public propertyStampId
Stamp ID of next added stamp (incluiding page headers/hooters/page numbers).
Public propertyCode exampleStartingNumber
Gets or 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...
Methods
  NameDescription
Public methodCode exampleAddFooter(Stream, Single)
Adds image as footer of the page.
Public methodCode exampleAddFooter(String, Single)
Adds image as footer to the pages of the document.
Public methodCode exampleAddFooter(FormattedText, Single)
Adds footer to the pages of the document.
Public methodCode exampleAddFooter(Stream, Single, Single, Single)
Adds image as footer of the page.
Public methodCode exampleAddFooter(String, Single, Single, Single)
Adds image as footer of the pages.
Public methodCode exampleAddFooter(FormattedText, Single, Single, Single)
Adds footer to the pages of the document.
Public methodCode exampleAddHeader(Stream, Single)
Adds image as header on the pages.
Public methodCode exampleAddHeader(String, Single)
Adds image as header to the pages of the file.
Public methodCode exampleAddHeader(FormattedText, Single)
Adds header to the page.
Public methodCode exampleAddHeader(Stream, Single, Single, Single)
Adds image at the top of the page.
Public methodCode exampleAddHeader(String, Single, Single, Single)
Adds image as header on the pages.
Public methodCode exampleAddHeader(FormattedText, Single, Single, Single)
Adds header to the pages of file.
Public methodCode exampleAddPageNumber(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.
Public methodCode exampleAddPageNumber(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.
Public methodCode exampleAddPageNumber(String, Int32)
Adds page number to the pages.
Public methodCode exampleAddPageNumber(FormattedText, Int32)
Adds page number to the pages.
Public methodCode exampleAddPageNumber(String, Single, Single)
Adds page number at the specified position on the page.
Public methodCode exampleAddPageNumber(FormattedText, Single, Single)
Adds page number at the specified position on the page.
Public methodCode exampleAddPageNumber(String, Int32, Single, Single, Single, Single)
Adds page number to the pages of document.
Public methodCode exampleAddPageNumber(FormattedText, Int32, Single, Single, Single, Single)
Adds page number to the pages of document.
Public methodCode exampleAddStamp
Adds stamp to the file.
Public methodBindPdf(Stream)
Initializes the facade.
(Inherited from Facade.)
Public methodBindPdf(String)
Initializes the facade.
(Inherited from Facade.)
Public methodBindPdf(Document)
Initializes the facade.
(Inherited from Facade.)
Public methodCode exampleClose
Closes opened files and saves changes. Warning. If input or output streams are specified they are not closed by Close() method.
(Overrides FacadeClose.)
Public methodDispose
Disposes the facade.
(Inherited from Facade.)
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodSave(Stream)
Saves document into specified stream.
(Overrides SaveableFacadeSave(Stream).)
Public methodSave(String)
Saves result into specified file.
(Overrides SaveableFacadeSave(String).)
Public methodToString (Inherited from Object.)
Fields
  NameDescription
Public fieldStatic memberPosBottomLeft
Bottom left position.
Public fieldStatic memberPosBottomMiddle
Bottom middle position.
Public fieldStatic memberPosBottomRight
Bottom right position.
Public fieldStatic memberPosSidesLeft
Left position.
Public fieldStatic memberPosSidesRight
Right position.
Public fieldStatic memberPosUpperLeft
Upper let position.
Public fieldStatic memberPosUpperMiddle
Upper middle position.
Public fieldStatic memberPosUpperRight
Right upper position.
See Also