PdfFileStamp

PdfFileStamp class

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

public sealed class PdfFileStamp : SaveableFacade

Constructors

Name Description
PdfFileStamp() Constructor of the PdfFileStamp. Input file and output file may be specified via corresponding properties.
PdfFileStamp(Document) Initializes new PdfFileStamp object on base of the document.

Properties

Name Description
AttachmentName { get; set; } Gets or sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
ContentDisposition { get; set; } Gets or sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
ConvertTo { set; } 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.
Document { get; } Gets the document facade is working on.
KeepSecurity { get; set; } Keeps security if true. (This feature will be implemented in next versions).
NumberingStyle { get; set; } Gets or sets pabge numbering style. Possible values: NumeralsArabic, NumeralsRomanUppercase, NumeralsRomanLowercase, LettersAppercase, LettersLowercase
OptimizeSize { get; set; } 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.
PageHeight { get; } Gets height of first page in souorce file.
PageNumberRotation { get; set; } Gets or sets rotation of page number. Rotation is in degrees. Default is 0.
PageWidth { get; } Gets width of first page in input file.
Response { get; set; } Gets or sets Response object where result of operation will be stored.
SaveOptions { get; set; } Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
StampId { get; set; } Stamp ID of next added stamp (incluiding page headers/hooters/page numbers).
StartingNumber { get; set; } 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

Name Description
AddFooter(FormattedText, float) Adds footer to the pages of the document.
AddFooter(Stream, float) Adds image as footer of the page.
AddFooter(string, float) Adds image as footer to the pages of the document.
AddFooter(FormattedText, float, float, float) Adds footer to the pages of the document.
AddFooter(Stream, float, float, float) Adds image as footer of the page.
AddFooter(string, float, float, float) Adds image as footer of the pages.
AddHeader(FormattedText, float) Adds header to the page.
AddHeader(Stream, float) Adds image as header on the pages.
AddHeader(string, float) Adds image as header to the pages of the file.
AddHeader(FormattedText, float, float, float) Adds header to the pages of file.
AddHeader(Stream, float, float, float) Adds image at the top of the page.
AddHeader(string, float, float, float) Adds image as header on the pages.
AddPageNumber(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(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(FormattedText, int) Adds page number to the pages.
AddPageNumber(string, int) Adds page number to the pages.
AddPageNumber(FormattedText, float, float) Adds page number at the specified position on the page.
AddPageNumber(string, float, float) Adds page number at the specified position on the page.
AddPageNumber(FormattedText, int, float, float, float, float) Adds page number to the pages of document.
AddPageNumber(string, int, float, float, float, float) Adds page number to the pages of document.
AddStamp(Stamp) Adds stamp to the file.
virtual BindPdf(Document) Initializes the facade.
virtual BindPdf(Stream) Initializes the facade.
virtual BindPdf(string) Initializes the facade.
override Close() Closes opened files and saves changes. Warning. If input or output streams are specified they are not closed by Close() method.
Dispose() Disposes the facade.
override Save(Stream) Saves document into specified stream.
override Save(string) Saves result into specified file.

Fields

Name Description
const PosBottomLeft Bottom left position.
const PosBottomMiddle Bottom middle position.
const PosBottomRight Bottom right position.
const PosSidesLeft Left position.
const PosSidesRight Right position.
const PosUpperLeft Upper let position.
const PosUpperMiddle Upper middle position.
const PosUpperRight Right upper position.

See Also