PdfTextStampOptions
OfficeIMO.Pdf
Options used when adding a simple text stamp or watermark to parsed PDF pages.
Inheritance
- object
- PdfTextStampOptions
Usage
Explore 4 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
Accepted by parameters 2
- Method PdfDocumentStamper.Text
- Method PdfDocumentStamper.TextWatermark
Constructors
public PdfTextStampOptions() #Methods
public PdfTextStampOptions UsePageRange(int firstPage, int lastPage) #Selects an inclusive one-based page range to stamp.
Parameters
- firstPage int
- lastPage int
Returns
PdfTextStampOptionspublic PdfTextStampOptions UsePageRange(PdfPageRange pageRange) #Selects an inclusive one-based page range to stamp.
Parameters
- pageRange OfficeIMO.Pdf.PdfPageRange
Returns
PdfTextStampOptionspublic PdfTextStampOptions UsePageRanges(params PdfPageRange[] pageRanges) #Selects inclusive one-based page ranges to stamp. Overlapping ranges are treated as one page selection set in first-seen order.
Parameters
- pageRanges OfficeIMO.Pdf.PdfPageRange[]
Returns
PdfTextStampOptionsInherited Methods
Properties
public int[]? PageNumbers { get; set; } #One-based page numbers to stamp. When null or empty, every page is stamped.
public OfficeLength? X { get; set; } #Physical X coordinate of the text baseline origin from the unrotated PDF origin. When null, stamps sit 36 points from the lower-left corner of the displayed page and watermarks center in it.
public OfficeLength? Y { get; set; } #Physical Y coordinate of the text baseline origin from the unrotated PDF origin. When null, stamps sit 36 points from the lower-left corner of the displayed page and watermarks center in it.
public PdfStandardFont Font { get; set; } #Standard PDF font used for the stamp.
public OfficeLength FontSize { get; set; } #Physical text size. Defaults to 24 points.
public OfficeColor Color { get; set; } #Text color, including alpha. Theme roles resolve against the default theme.
public double RotationDegrees { get; set; } #Counter-clockwise text rotation in degrees around the text origin, relative to the displayed page. On a page with /Rotate, unrotated text reads upright as the page is viewed.
public double Opacity { get; set; } #Text opacity from 0 through 1, multiplied by the text color alpha. Defaults to 1.
public bool BehindContent { get; set; } #Places the new content stream before existing page content when true.
public OfficeAlignment Align { get; set; } #Horizontal alignment of the text against PdfTextStampOptions.X: OfficeAlignment.Left (the default) starts the text at X, OfficeAlignment.Center centres it on X and OfficeAlignment.Right ends it at X. When X is null, centred text uses the page centre and right-aligned text ends 36 points from the right page edge.
public bool EmbedFont { get; set; } #When true (the default), the stamp text uses the installed font that backs PdfTextStampOptions.Font in the default theme, the same font documents created by OfficeIMO.Pdf use, embedded as a subset. When no such font is installed, or it lacks a character of the text, the non-embedded standard font is written instead. Set to false to always write the non-embedded standard font.