Cmdlet
New-OfficeWordPdfOptions
Creates discoverable Word-to-PDF conversion options for Export-OfficeDocumentPdf.
Syntax
New-OfficeWordPdfOptions
[-AllowDocumentFontEmbedding]
[-AllowSystemFontEmbedding]
[-Author <String>]
[-DefaultOrientation <Portrait| Landscape>]
[-DefaultPageSize <WordPageSize>]
[-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 SetsExamples
Configure metadata, page numbers, and font embedding.
$options = New-OfficeWordPdfOptions -Title 'Service report' -Author 'Evotec' -IncludePageNumbers -AllowSystemFontEmbedding
Export-OfficeDocumentPdf -InputPath .\Report.docx -Path .\Report.pdf -WordOptions $optionsParameters
- -AllowDocumentFontEmbedding SwitchParameter
- Allow embedding installed fonts selected by a trusted Word document. System-font embedding must also be enabled.
- -AllowSystemFontEmbedding SwitchParameter
- Allow embedding fonts discovered on the current system.
- PDF author metadata.
- -DefaultOrientation OfficePageOrientation
- Fallback page orientation for sections without page settings.
- Possible values:
Portrait,Landscape - -DefaultPageSize WordPageSize
- Fallback Word page size for sections without page settings.
- Possible values:
Unknown,Letter,Legal,Statement,Executive,A3,A4,A5,A6,B5,Tabloid,B4Jis,Envelope9,Envelope10,CSheet,EnvelopeDl,EnvelopeC5,EnvelopeC4,EnvelopeB5,EnvelopeMonarch - -DefaultTableBorders SwitchParameter
- Draw default borders for tables that do not specify borders.
- -FontFamily String
- Default font family used when the document does not specify one.
- -IncludePageNumbers SwitchParameter
- Include page numbers in the generated PDF.
- -Keywords String
- PDF keywords metadata.
- -MarginBottom Double
- Bottom page margin in PDF points.
- -MarginLeft Double
- Left page margin in PDF points.
- -MarginRight Double
- Right page margin in PDF points.
- -MarginTop Double
- Top page margin in PDF points.
- -Orientation OfficePageOrientation
- PDF page orientation.
- Possible values:
Portrait,Landscape - -PageNumberFormat String
- Page number text format.
- -PageSize PageSize
- PDF page size.
- -PdfOptions PdfOptions
- Underlying low-level OfficeIMO PDF options.
- -Subject String
- PDF subject metadata.
- -Title String
- PDF title metadata.
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.