API Reference
PdfParagraphBuilder
Fluent builder for rich paragraphs made of styled text runs.
Inheritance
- Object
- PdfParagraphBuilder
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PdfParagraphBuilder.BackgroundColor
- Method PdfParagraphBuilder.Baseline
- Method PdfParagraphBuilder.Bold
- Method PdfParagraphBuilder.Bold
- Method PdfParagraphBuilder.Color
- Method PdfParagraphBuilder.FallbackText
- Method PdfParagraphBuilder.Font
- Method PdfParagraphBuilder.FontFamily
- Method PdfParagraphBuilder.FontSize
- Method PdfParagraphBuilder.Inline
- Method PdfParagraphBuilder.InlineBox
- Method PdfParagraphBuilder.InlineImage
- Method PdfParagraphBuilder.Italic
- Method PdfParagraphBuilder.Italic
- Method PdfParagraphBuilder.LineBreak
- Method PdfParagraphBuilder.Link
- Method PdfParagraphBuilder.LinkToBookmark
- Method PdfParagraphBuilder.ResetBackgroundColor
- Method PdfParagraphBuilder.ResetColor
- Method PdfParagraphBuilder.ResetFont
- Method PdfParagraphBuilder.ResetFontSize
- Method PdfParagraphBuilder.Runs
- Method PdfParagraphBuilder.Strike
- Method PdfParagraphBuilder.Strikethrough
- Method PdfParagraphBuilder.Subscript
- Method PdfParagraphBuilder.Subscript
- Method PdfParagraphBuilder.Superscript
- Method PdfParagraphBuilder.Superscript
- Method PdfParagraphBuilder.Tab
- Method PdfParagraphBuilder.Text
- Method PdfParagraphBuilder.Underline
- Method PdfParagraphBuilder.Underlined
Accepted by parameters
- Method PdfDocument.PanelParagraph
- Method PdfDocument.Paragraph
- Method PdfElementCompose.PanelParagraph
- Method PdfElementCompose.Paragraph
- Method PdfItemCompose.PanelParagraph
- Method PdfItemCompose.Paragraph
- Method PdfRowColumnCompose.PanelParagraph
- Method PdfRowColumnCompose.Paragraph
Constructors
public PdfParagraphBuilder(PdfAlign align, Nullable<PdfColor> defaultColor) #Create a new paragraph builder.
Parameters
- align OfficeIMO.Pdf.PdfAlign
- Paragraph alignment.
- defaultColor System.Nullable{OfficeIMO.Pdf.PdfColor}
- Optional default text color.
Methods
public PdfParagraphBuilder BackgroundColor(PdfColor color) #PdfParagraphBuilderSets the current run background color.
Parameters
- color OfficeIMO.Pdf.PdfColor
public PdfParagraphBuilder Baseline(PdfTextBaseline baseline) #PdfParagraphBuilderSets the current baseline placement for subsequent runs.
Parameters
- baseline OfficeIMO.Pdf.PdfTextBaseline
public PdfParagraphBuilder Bold(Boolean enable = true) #PdfParagraphBuilderEnables or disables bold for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Bold(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds a bold text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfParagraphBuilder Color(PdfColor color) #PdfParagraphBuilderSets the current run color.
Parameters
- color OfficeIMO.Pdf.PdfColor
public PdfParagraphBuilder FallbackText(PdfEmbeddedFontFallbackSet fallbackSet, String text, String source = "") #PdfParagraphBuilderAdds text planned through an embedded-font fallback set while preserving the current run styling.
Parameters
- fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet
- text System.String
- source System.String = ""
public PdfParagraphBuilder Font(PdfStandardFont font) #PdfParagraphBuilderSets the current standard PDF font for subsequent runs.
Parameters
- font OfficeIMO.Pdf.PdfStandardFont
public PdfParagraphBuilder FontFamily(String familyName) #PdfParagraphBuilderSets a registered embedded named family for subsequent runs.
Parameters
- familyName System.String
public PdfParagraphBuilder FontSize(Double fontSize) #PdfParagraphBuilderSets the current run font size in points.
Parameters
- fontSize System.Double
public PdfParagraphBuilder Inline(PdfInlineElement element) #PdfParagraphBuilderAdds a fixed-size visual that participates in paragraph wrapping.
Parameters
- element OfficeIMO.Pdf.PdfInlineElement
public PdfParagraphBuilder InlineBox(Double width, Double height, Nullable<PdfColor> background = null, Nullable<PdfColor> borderColor = null, Double borderWidth = 0.5, String alternativeText = null, Double baselineOffset = 0) #PdfParagraphBuilderAdds a filled and/or bordered box that participates in paragraph wrapping.
Parameters
- width System.Double
- height System.Double
- background System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- borderColor System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- borderWidth System.Double = 0.5
- alternativeText System.String = null
- baselineOffset System.Double = 0
public PdfParagraphBuilder InlineImage(Byte[] imageBytes, Double width, Double height, String alternativeText = null, OfficeImageFit fit = Contain, Double baselineOffset = 0) #PdfParagraphBuilderAdds an image that participates in paragraph wrapping.
Parameters
- imageBytes System.Byte[]
- width System.Double
- height System.Double
- alternativeText System.String = null
- fit OfficeIMO.Drawing.OfficeImageFit = Contain
- baselineOffset System.Double = 0
public PdfParagraphBuilder Italic(Boolean enable = true) #PdfParagraphBuilderEnables or disables italic for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Italic(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds an italic text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfParagraphBuilder LineBreak() #PdfParagraphBuilderAdds an explicit line break inside the current paragraph.
public PdfParagraphBuilder Link(String text, String uri, Nullable<PdfColor> color = null, Boolean underline = true, String contents = null) #PdfParagraphBuilderAdds a hyperlink text run.
Parameters
- text System.String
- Link text.
- uri System.String
- Absolute URI or catalog-base-relative URI to open.
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- Optional link color.
- underline System.Boolean = true
- Whether to underline the link text (default true).
- contents System.String = null
- Optional link annotation contents; defaults to the link text when omitted.
public PdfParagraphBuilder LinkToBookmark(String text, String bookmarkName, Nullable<PdfColor> color = null, Boolean underline = true, String contents = null) #PdfParagraphBuilderAdds a hyperlink text run that points to a document bookmark.
Parameters
- text System.String
- Link text.
- bookmarkName System.String
- Named destination created with String).
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
- Optional link color.
- underline System.Boolean = true
- Whether to underline the link text (default true).
- contents System.String = null
- Optional link annotation contents; defaults to the link text when omitted.
public PdfParagraphBuilder ResetBackgroundColor() #PdfParagraphBuilderResets the current run background color.
public PdfParagraphBuilder ResetColor() #PdfParagraphBuilderResets the current run color to the paragraph default color.
public PdfParagraphBuilder ResetFont() #PdfParagraphBuilderResets the current run font to the paragraph/document font.
public PdfParagraphBuilder ResetFontSize() #PdfParagraphBuilderResets the current run font size to the paragraph default font size.
public PdfParagraphBuilder Runs(IEnumerable<TextRun> runs) #PdfParagraphBuilderAdds already prepared rich text runs, preserving their per-run styling and font selections.
Parameters
- runs System.Collections.Generic.IEnumerable{OfficeIMO.Pdf.TextRun}
public PdfParagraphBuilder Strike(Boolean enable = true) #PdfParagraphBuilderEnables or disables strikethrough for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Strikethrough(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds a strikethrough text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfParagraphBuilder Subscript(Boolean enable = true) #PdfParagraphBuilderEnables or disables subscript baseline placement for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Subscript(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds a subscript text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfParagraphBuilder Superscript(Boolean enable = true) #PdfParagraphBuilderEnables or disables superscript baseline placement for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Superscript(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds a superscript text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
public PdfParagraphBuilder Tab(PdfTabLeaderStyle leader = None, PdfTabAlignment alignment = Left) #PdfParagraphBuilderAdds an explicit paragraph tab using the current style flags.
Parameters
- leader OfficeIMO.Pdf.PdfTabLeaderStyle = None
- alignment OfficeIMO.Pdf.PdfTabAlignment = Left
public PdfParagraphBuilder Text(String text) #PdfParagraphBuilderAdds a text run using the current style flags.
Parameters
- text System.String
public PdfParagraphBuilder Underline(Boolean enable = true) #PdfParagraphBuilderEnables or disables underline for subsequent runs.
Parameters
- enable System.Boolean = true
public PdfParagraphBuilder Underlined(String text, Nullable<PdfColor> color = null) #PdfParagraphBuilderAdds an underlined text run.
Parameters
- text System.String
- color System.Nullable{OfficeIMO.Pdf.PdfColor} = null
Inherited Methods
Properties
public Nullable<PdfColor> DefaultColor { get; } #Default text color applied when no run color is specified.