PdfHeaderBuilder
OfficeIMO.Pdf
Header builder. Forwards to the header slots of PdfPageSetup.
Inheritance
- object
- PdfHeaderBuilder
Usage
Explore 27 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 26
- Method PdfHeaderBuilder.Alignment
- Method PdfHeaderBuilder.Color
- Method PdfHeaderBuilder.Content
- Method PdfHeaderBuilder.EvenPagesContent
- Method PdfHeaderBuilder.EvenPagesImage
- Method PdfHeaderBuilder.EvenPagesShape
- Method PdfHeaderBuilder.EvenPagesStyledZones
- Method PdfHeaderBuilder.EvenPagesText
- Method PdfHeaderBuilder.EvenPagesZones
- Method PdfHeaderBuilder.FirstPageContent
- Method PdfHeaderBuilder.FirstPageImage
- Method PdfHeaderBuilder.FirstPageShape
- Method PdfHeaderBuilder.FirstPageStyledZones
- Method PdfHeaderBuilder.FirstPageText
- Method PdfHeaderBuilder.FirstPageZones
- Method PdfHeaderBuilder.FontFamily
- Method PdfHeaderBuilder.FontSize
- Method PdfHeaderBuilder.Image
- Method PdfHeaderBuilder.Offset
- Method PdfHeaderBuilder.PageNumber
- Method PdfHeaderBuilder.PageNumberWithTotal
- Method PdfHeaderBuilder.Shape
- Method PdfHeaderBuilder.StandardFont
- Method PdfHeaderBuilder.StyledZones
- Method PdfHeaderBuilder.Text
- Method PdfHeaderBuilder.Zones
Accepted by parameters 1
- Method PdfPageBuilder.Header
Methods
public PdfHeaderBuilder Alignment(OfficeAlignment alignment) #Sets PdfHeaderFooter.Alignment of the header text.
Parameters
- alignment OfficeIMO.OfficeAlignment
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Color(OfficeColor color) #Sets PdfHeaderFooter.Color of the header text.
Parameters
- color OfficeIMO.OfficeColor
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Content(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Content(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Content(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Replaces the default header with bounded document flow at a distance from the top page edge. Uses normal content-builder styles; content cannot create pages.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Content(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Composes the default bounded header from final page information. The factory can run during pagination stabilization and must be deterministic.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesContent(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesContent(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesContent(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Replaces even-page headers with bounded flow measured from the top page edge.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesContent(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Composes bounded even-page header flow from final page information.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesImage(byte[] data, OfficeLength width, OfficeLength height, string? alternativeText) #Adds a meaningful image to the even-page-only header with alternate text.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- alternativeText string?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesImage(byte[] data, OfficeLength width, OfficeLength height, OfficeAlignment align = Left, OfficeImageFit fit = Stretch, string? alternativeText = null) #Adds an image to the even-page-only header.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- align OfficeIMO.OfficeAlignment = Left
- fit OfficeIMO.Drawing.OfficeImageFit = Stretch
- alternativeText string? = null
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesShape(OfficeShape shape, OfficeAlignment align = Left) #Adds a shape to the even-page-only header.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- align OfficeIMO.OfficeAlignment = Left
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesStyledZones(Action<PdfHeaderTextBuilder>? left, Action<PdfHeaderTextBuilder>? center, Action<PdfHeaderTextBuilder>? right) #Renders independently styled even-page-only header zones.
Parameters
- left System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- center System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- right System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesText(string format) #Renders an even-page-only header text format. Supports {page} and {pages}.
Parameters
- format string
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesText(Action<PdfHeaderTextBuilder> build) #Builds an even-page-only header from text and page tokens.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>
- Delegate to compose even-page header segments.
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder EvenPagesZones(string? left, string? center, string? right) #Renders even-page-only left, center, and right header zones. Supports {page} and {pages}.
Parameters
- left string?
- center string?
- right string?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageContent(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageContent(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge) #Composes bounded header content without an additional gap from the body.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageContent(Action<PdfContentBuilder> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Replaces the first-page header with bounded flow measured from the top page edge.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfContentBuilder>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageContent(Func<PdfRunningContentContext, Action<PdfContentBuilder>> build, OfficeLength distanceFromEdge, OfficeLength bodyGap) #Composes bounded first-page header flow from final page information.
Parameters
- build System.Func<OfficeIMO.Pdf.PdfRunningContentContext, System.Action<OfficeIMO.Pdf.PdfContentBuilder>>
- distanceFromEdge OfficeIMO.OfficeLength
- bodyGap OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageImage(byte[] data, OfficeLength width, OfficeLength height, string? alternativeText) #Adds a meaningful image to the page-1-only header with alternate text.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- alternativeText string?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageImage(byte[] data, OfficeLength width, OfficeLength height, OfficeAlignment align = Left, OfficeImageFit fit = Stretch, string? alternativeText = null) #Adds an image to the page-1-only header.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- align OfficeIMO.OfficeAlignment = Left
- fit OfficeIMO.Drawing.OfficeImageFit = Stretch
- alternativeText string? = null
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageShape(OfficeShape shape, OfficeAlignment align = Left) #Adds a shape to the page-1-only header.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- align OfficeIMO.OfficeAlignment = Left
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageStyledZones(Action<PdfHeaderTextBuilder>? left, Action<PdfHeaderTextBuilder>? center, Action<PdfHeaderTextBuilder>? right) #Renders independently styled page-1-only header zones.
Parameters
- left System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- center System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- right System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageText(string format) #Renders a page-1-only header text format. Supports {page} and {pages}.
Parameters
- format string
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageText(Action<PdfHeaderTextBuilder> build) #Builds a page-1-only header from text and page tokens.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>
- Delegate to compose first-page header segments.
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FirstPageZones(string? left, string? center, string? right) #Renders page-1-only left, center, and right header zones. Supports {page} and {pages}.
Parameters
- left string?
- center string?
- right string?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FontFamily(string familyName) #Sets PdfHeaderFooter.FontFamily to a registered named font family.
Parameters
- familyName string
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder FontSize(OfficeLength size) #Sets PdfHeaderFooter.FontSize.
Parameters
- size OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Image(byte[] data, OfficeLength width, OfficeLength height, string? alternativeText) #Adds a meaningful image to the running header with alternate text.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- alternativeText string?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Image(byte[] data, OfficeLength width, OfficeLength height, OfficeAlignment align = Left, OfficeImageFit fit = Stretch, string? alternativeText = null) #Adds an image to the running header.
Parameters
- data byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- align OfficeIMO.OfficeAlignment = Left
- fit OfficeIMO.Drawing.OfficeImageFit = Stretch
- alternativeText string? = null
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Offset(OfficeLength offset) #Sets PdfHeaderFooter.Offset, the baseline distance above the top margin.
Parameters
- offset OfficeIMO.OfficeLength
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder PageNumber() #Renders the current page number in the header.
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder PageNumberWithTotal() #Renders the current page number and total pages in the header.
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Shape(OfficeShape shape, OfficeAlignment align = Left) #Adds a shape to the running header.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- align OfficeIMO.OfficeAlignment = Left
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder StandardFont(PdfStandardFont font) #Sets PdfHeaderFooter.StandardFont and clears PdfHeaderFooter.FontFamily.
Parameters
- font OfficeIMO.Pdf.PdfStandardFont
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder StyledZones(Action<PdfHeaderTextBuilder>? left, Action<PdfHeaderTextBuilder>? center, Action<PdfHeaderTextBuilder>? right) #Renders independently styled left, center, and right header zones on one line.
Parameters
- left System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- center System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
- right System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>?
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Text(string format) #Renders a literal header text format. Supports {page} and {pages}.
Parameters
- format string
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Text(Action<PdfHeaderTextBuilder> build) #Builds a custom header from text and page tokens.
Parameters
- build System.Action<OfficeIMO.Pdf.PdfHeaderTextBuilder>
- Delegate to compose header segments.
Returns
PdfHeaderBuilderpublic PdfHeaderBuilder Zones(string? left, string? center, string? right) #Renders left, center, and right header zones on one line. Supports {page} and {pages}.
Parameters
- left string?
- center string?
- right string?
Returns
PdfHeaderBuilder