Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficePdfText

Aliases: PdfText
Module
PSWriteOffice
Aliases
PdfText
Inputs
OfficeIMO.Pdf.PdfDocument
Outputs
OfficeIMO.Pdf.PdfDocument

Adds one styled run inside a PDF paragraph or running header/footer, or a standalone paragraph.

Syntax

Add-OfficePdfText
[-Alignment <OfficeAlignment>]
[-BackgroundColor <OfficeColor>]
[-Baseline <Normal|Superscript|Subscript>]
[-Bold]
[-Color <OfficeColor>]
[-Font <String>]
[-Italic]
[-Link <String>]
[-LinkBookmark <String>]
[-LinkContents <String>]
[-Size <OfficeLength>]
[-Strikethrough]
[-TabAlignment <Left|Right|Center|DecimalSeparator|Bar>]
[-TabLeader <Dots|Hyphens|Underscores>]
[-Text] <String>
[-Underline <OfficeTextDecorationStyle>]
[<CommonParameters>]
#
Parameter set: Context
Add-OfficePdfText
[-Alignment <OfficeAlignment>]
[-BackgroundColor <OfficeColor>]
[-Baseline <Normal|Superscript|Subscript>]
[-Bold]
[-Color <OfficeColor>]
-Document <PdfDocument>
[-Font <String>]
[-Italic]
[-Link <String>]
[-LinkBookmark <String>]
[-LinkContents <String>]
[-PassThru]
[-Size <OfficeLength>]
[-Strikethrough]
[-TabAlignment <Left|Right|Center|DecimalSeparator|Bar>]
[-TabLeader <Dots|Hyphens|Underscores>]
[-Text] <String>
[-Underline <OfficeTextDecorationStyle>]
[<CommonParameters>]
#
Parameter set: Document

Examples

Compose rich PDF text.

PdfParagraph { PdfText 'Review ' -Italic; PdfText 'complete' -Bold -Color Success }

Parameters

-Alignment OfficeAlignment optional
Standalone paragraph alignment.
Possible values: Left, Center, Right, Justify, Start, End
-BackgroundColor OfficeColor optional
Run background color.
-Baseline PdfTextBaseline optional
Run baseline.
Possible values: Normal, Superscript, Subscript
-Bold SwitchParameter optional
Set bold on or off.
-Color OfficeColor optional
Run foreground color.
-Font String optional
Standard PDF font name or registered embedded family.
-Italic SwitchParameter optional
Set italic on or off.
URI hyperlink target.
-LinkBookmark String optional
Named bookmark target.
-LinkContents String optional
Link annotation contents.
-Size OfficeLength optional
Font size; bare numbers mean points.
-Strikethrough SwitchParameter optional
Set strikethrough on or off.
-TabAlignment PdfTabAlignment optional
Alignment for an explicit tab text.
Possible values: Left, Right, Center, DecimalSeparator, Bar
-TabLeader PdfTabLeaderStyle optional
Leader pattern for an explicit tab text (a single tab character).
Possible values: Dots, Hyphens, Underscores
-Text String requiredposition: 0
Text for this run.
-Underline OfficeTextDecorationStyle optional
Underline pattern; None clears it.
Possible values: Single, Double, Dotted, Dashed, Wavy, Words
-Document PdfDocument requiredpipeline: True (ByValue)sets: Document
Live PDF outside a composition block.
-PassThru SwitchParameter optionalsets: Document
Emit the updated live document.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.