API Reference

Cmdlet

Set-OfficePdfHeader

Aliases: PdfHeader
Namespace PSWriteOffice
Aliases
PdfHeader
Inputs
OfficeIMO.Pdf.PdfDocument
Outputs
OfficeIMO.Pdf.PdfDocument

Sets running PDF header text.

Remarks

Sets running PDF header text.

Examples

Authored help example

Add a running report header.

PS>


New-OfficePdf -Path .\Examples\Documents\PdfHeader.pdf {
                Set-OfficePdfHeader -Text 'Service Review' -Align Right -FontSize 9
                Add-OfficePdfHeading -Text 'Service Review'
                Add-OfficePdfParagraph -Text 'The header repeats on generated pages.'
            }
        

Sets header text for the generated PDF.

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.

Syntax

Set-OfficePdfHeader [-Align <Left|Center|Right|Justify>] [-FontSize <Nullable`1>] [-PassThru] -Text <String> [<CommonParameters>]
#
Parameter set: Context

Parameters

Align PdfAlign optionalposition: namedpipeline: Falsevalues: 4
Header alignment.
Possible values: Left, Center, Right, Justify
FontSize Nullable`1 optionalposition: namedpipeline: False
Header font size in PDF points.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
Text String requiredposition: 0pipeline: False
Header text. Supports {page} and {pages}.

Outputs

OfficeIMO.Pdf.PdfDocument

Set-OfficePdfHeader [-Align <Left|Center|Right|Justify>] -Document <PdfDocument> [-FontSize <Nullable`1>] [-PassThru] -Text <String> [<CommonParameters>]
#
Parameter set: Document

Parameters

Align PdfAlign optionalposition: namedpipeline: Falsevalues: 4
Header alignment.
Possible values: Left, Center, Right, Justify
Document PdfDocument requiredposition: namedpipeline: True (ByValue)
PDF document to update outside the DSL context.
FontSize Nullable`1 optionalposition: namedpipeline: False
Header font size in PDF points.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the updated document.
Text String requiredposition: 0pipeline: False
Header text. Supports {page} and {pages}.

Outputs

OfficeIMO.Pdf.PdfDocument