Cmdlet
New-OfficeTextPdfOptions
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>]#Parameter set:
DefaultDescription
Pass the result to Convert-OfficeDocument -Options when converting plain text files to PDF.
Examples
Read UTF-16 text with four-column tabs.
$options = New-OfficeTextPdfOptions -Encoding utf-16 -TabSize 4
Convert-OfficeDocument -To Pdf -Path .\Report.txt -OutputPath .\Report.pdf -Options $optionsParameters
- -Encoding String
- Explicit encoding; otherwise use a Unicode BOM or strict UTF-8.
- -MaximumCharacters Int32
- Maximum decoded and expanded characters.
- -MaximumPages Int32
- Maximum generated pages.
- -PdfOptions PdfCreateOptions
- PDF fonts and page geometry; default is ten-point Courier.
- -TabSize Int32
- 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.