Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficeTextPdfOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Pdf.PdfPlainTextOptions

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

Syntax

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

Examples

Read UTF-16 text with four-column tabs.

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

Parameters

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

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.