API Reference

Cmdlet

New-OfficeWordPdfOptions

Namespace PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Word.Pdf.WordPdfSaveOptions

Creates discoverable Word-to-PDF conversion options for Export-OfficeDocumentPdf.

Remarks

Creates discoverable Word-to-PDF conversion options for Export-OfficeDocumentPdf.

Examples

Authored help example

Configure metadata, page numbers, and font embedding.

PS>


$options = New-OfficeWordPdfOptions -Title 'Service report' -Author 'Evotec' -IncludePageNumbers -AllowSystemFontEmbedding
            Export-OfficeDocumentPdf -InputPath .\Report.docx -Path .\Report.pdf -WordOptions $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-OfficeWordPdfOptions [-AllowDocumentFontEmbedding] [-AllowSystemFontEmbedding] [-Author <String>] [-DefaultOrientation <Portrait|Landscape>] [-DefaultPageSize <Unknown>] [-DefaultTableBorders] [-FontFamily <String>] [-IncludePageNumbers] [-Keywords <String>] [-MarginBottom <Double>] [-MarginLeft <Double>] [-MarginRight <Double>] [-MarginTop <Double>] [-Orientation <Portrait|Landscape>] [-PageNumberFormat <String>] [-PageSize <PageSize>] [-PdfOptions <PdfOptions>] [-Subject <String>] [-Title <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AllowDocumentFontEmbedding SwitchParameter optionalposition: namedpipeline: False
Allow embedding fonts stored in the Word document.
AllowSystemFontEmbedding SwitchParameter optionalposition: namedpipeline: False
Allow embedding fonts discovered on the current system.
Author String optionalposition: namedpipeline: False
PDF author metadata.
DefaultOrientation OfficePageOrientation optionalposition: namedpipeline: Falsevalues: 2
Fallback page orientation for sections without page settings.
Possible values: Portrait, Landscape
DefaultPageSize WordPageSize optionalposition: namedpipeline: Falsevalues: 10
Fallback Word page size for sections without page settings.
Possible values: Unknown, Letter, Legal, Statement, Executive, A3, A4, A5, A6, B5
DefaultTableBorders SwitchParameter optionalposition: namedpipeline: False
Draw default borders for tables that do not specify borders.
FontFamily String optionalposition: namedpipeline: False
Default font family used when the document does not specify one.
IncludePageNumbers SwitchParameter optionalposition: namedpipeline: False
Include page numbers in the generated PDF.
Keywords String optionalposition: namedpipeline: False
PDF keywords metadata.
MarginBottom Double optionalposition: namedpipeline: False
Bottom page margin in PDF points.
MarginLeft Double optionalposition: namedpipeline: False
Left page margin in PDF points.
MarginRight Double optionalposition: namedpipeline: False
Right page margin in PDF points.
MarginTop Double optionalposition: namedpipeline: False
Top page margin in PDF points.
Orientation OfficePageOrientation optionalposition: namedpipeline: Falsevalues: 2
PDF page orientation.
Possible values: Portrait, Landscape
PageNumberFormat String optionalposition: namedpipeline: False
Page number text format.
PageSize PageSize optionalposition: namedpipeline: False
PDF page size.
PdfOptions PdfOptions optionalposition: namedpipeline: False
Underlying low-level OfficeIMO PDF options.
Subject String optionalposition: namedpipeline: False
PDF subject metadata.
Title String optionalposition: namedpipeline: False
PDF title metadata.

Outputs

OfficeIMO.Word.Pdf.WordPdfSaveOptions