PdfParagraph
OfficeIMO.Pdf
A paragraph of styled text runs in the document flow. The paragraph stays editable until the document is laid out: runs added or formatted later are rendered.
Inheritance
- object
- PdfParagraph
Usage
Explore 6 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 3
- Method PdfDocument.AddParagraph
- Method PdfParagraph.AddFallbackText
- Method PdfParagraph.AddRuns
Accepted by parameters 3
- Method PdfContentBuilder.AddPanelParagraph
- Method PdfContentBuilder.AddParagraph
- Method PdfDocument.AddParagraph
Methods
public PdfTextRun AddBookmarkLink(string text, string bookmarkName, OfficeColor? color = null, bool underline = true, string? contents = null) #Appends a hyperlink run that points to a document bookmark.
Parameters
- text string
- Link text.
- bookmarkName string
- Named destination created with a bookmark in the same document.
- color OfficeIMO.OfficeColor? = null
- Optional link colour; defaults to PdfTextRunDefaults.Color.
- underline bool = true
- Whether to underline the link text (default true).
- contents string? = null
- Optional link annotation contents; defaults to the link text when omitted.
Returns
PdfTextRunpublic PdfParagraph AddFallbackText(PdfEmbeddedFontFallbackSet fallbackSet, string text, string source = "") #Appends text planned through an embedded-font fallback set, formatted from PdfParagraph.RunDefaults.
Parameters
- fallbackSet OfficeIMO.Pdf.PdfEmbeddedFontFallbackSet
- text string
- source string = ""
Returns
PdfParagraphpublic PdfTextRun AddInline(PdfInlineElement element) #Appends an inline visual; flexible rules take their typography from PdfParagraph.RunDefaults.
Parameters
- element OfficeIMO.Pdf.PdfInlineElement
Returns
PdfTextRunpublic PdfTextRun AddInlineBox(OfficeLength width, OfficeLength height, OfficeColor? background = null, OfficeColor? borderColor = null, OfficeLength? borderWidth = null, string? altText = null, OfficeLength? baselineOffset = null) #Appends a filled and/or bordered box that participates in paragraph wrapping.
Parameters
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- background OfficeIMO.OfficeColor? = null
- borderColor OfficeIMO.OfficeColor? = null
- borderWidth OfficeIMO.OfficeLength? = null
- altText string? = null
- baselineOffset OfficeIMO.OfficeLength? = null
Returns
PdfTextRunpublic PdfTextRun AddInlineImage(byte[] imageBytes, OfficeLength width, OfficeLength height, string? altText = null, OfficeImageFit fit = Contain, OfficeLength? baselineOffset = null) #Appends an image that participates in paragraph wrapping.
Parameters
- imageBytes byte[]
- width OfficeIMO.OfficeLength
- height OfficeIMO.OfficeLength
- altText string? = null
- fit OfficeIMO.Drawing.OfficeImageFit = Contain
- baselineOffset OfficeIMO.OfficeLength? = null
Returns
PdfTextRunpublic PdfTextRun AddLineBreak() #Appends an explicit line break formatted from PdfParagraph.RunDefaults.
Returns
PdfTextRunpublic PdfTextRun AddLink(string text, string uri, OfficeColor? color = null, bool underline = true, string? contents = null) #Appends a hyperlink run. It takes its size, font, background, baseline and decoration patterns from PdfParagraph.RunDefaults.
Parameters
- text string
- Link text.
- uri string
- Absolute URI or catalog-base-relative URI to open.
- color OfficeIMO.OfficeColor? = null
- Optional link colour; defaults to PdfTextRunDefaults.Color.
- underline bool = true
- Whether to underline the link text (default true).
- contents string? = null
- Optional link annotation contents; defaults to the link text when omitted.
Returns
PdfTextRunpublic PdfParagraph AddRuns(IEnumerable<PdfTextRun> runs) #Appends prepared runs as they are, keeping their own formatting and font selections.
Parameters
- runs System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTextRun>
Returns
PdfParagraphpublic PdfTextRun AddTab(PdfTabLeaderStyle leader = None, PdfTabAlignment alignment = Left) #Appends an aligned paragraph tab formatted from PdfParagraph.RunDefaults.
Parameters
- leader OfficeIMO.Pdf.PdfTabLeaderStyle = None
- alignment OfficeIMO.Pdf.PdfTabAlignment = Left
Returns
PdfTextRunpublic PdfTextRun AddText(string text) #Appends a text run formatted from PdfParagraph.RunDefaults and returns it.
Parameters
- text string
Returns
PdfTextRun