# New-OfficeTextPdfOptions

Creates literal text decoding and PDF layout settings for Convert-OfficeDocument -To Pdf.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Pdf.PdfTextImportOptions`

**Source**

[NewOfficeTextPdfOptionsCommand.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/NewOfficeTextPdfOptionsCommand.cs#L13) 

Creates literal text decoding and PDF layout settings for Convert-OfficeDocument -To Pdf.

## Syntax

```
New-OfficeTextPdfOptions
[-Encoding <String>]
[-MaximumCharacters <Int32>]
[-MaximumPages <Int32>]
[-PdfOptions <PdfCreateOptions>]
[-TabSize <Int32>]
[<CommonParameters>]
```

[#](#method-new-officetextpdfoptions-string-int32-int32-pdfcreateoptions-int32)

Parameter set: `Default`

## Description

Pass the result to Convert-OfficeDocument -Options when converting plain text files to PDF.

## Examples

### Read UTF-16 text with four-column tabs.

```powershell
$options = New-OfficeTextPdfOptions -Encoding utf-16 -TabSize 4
Convert-OfficeDocument -To Pdf -Path .\Report.txt -OutputPath .\Report.pdf -Options $options
```

## Parameters

**-Encoding 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 PdfCreateOptions 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:ECF0E58DA0A6D5BF25FB693E484C2FDD6EEBDC457918C6233B244C5CCE7629EE -->
