Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 165
Forks 15
PowerShell Gallery downloads 158,661
Release v3.0.8
Language: C# Updated: 2026-10-12

API Reference

Cmdlet

New-OfficeTextPdfOptions

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Pdf.PdfPlainTextOptions

Creates literal text decoding and PDF layout settings for Export-OfficeDocumentPdf.

Remarks

Creates literal text decoding and PDF layout settings for Export-OfficeDocumentPdf.

Examples

Authored help example

Read UTF-16 text with four-column tabs.

PS>


$options = New-OfficeTextPdfOptions -EncodingName utf-16 -TabSize 4
            Export-OfficeDocumentPdf -InputPath .\Report.txt -Path .\Report.pdf -TextOptions $options
        

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

New-OfficeTextPdfOptions [-EncodingName <String>] [-MaximumCharacters <Int32>] [-MaximumPages <Int32>] [-PdfOptions <PdfOptions>] [-TabSize <Int32>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

EncodingName String optionalposition: namedpipeline: False
Explicit encoding; otherwise use a Unicode BOM or strict UTF-8.
MaximumCharacters Int32 optionalposition: namedpipeline: False
Maximum decoded and expanded characters.
MaximumPages Int32 optionalposition: namedpipeline: False
Maximum generated pages.
PdfOptions PdfOptions optionalposition: namedpipeline: False
PDF fonts and page geometry; default is ten-point Courier.
TabSize Int32 optionalposition: namedpipeline: False
Source columns per tab stop.

Outputs

OfficeIMO.Pdf.PdfPlainTextOptions