Cmdlet
New-OfficeWordPdfOptions
Creates discoverable Word-to-PDF conversion options for Convert-OfficeDocument.
Syntax
New-OfficeWordPdfOptions
[-AllowDocumentFontEmbedding]
[-AllowSystemFontEmbedding]
[-Author <String>]
[-ChartFidelity <Strict| BestEffort>]
[-DefaultTableBorders]
[-FallbackOrientation <Portrait| Landscape>]
[-FallbackPageSize <PdfPageSize>]
[-Font <String>]
[-IncludePageNumbers]
[-Keywords <String>]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-Orientation <Portrait| Landscape>]
[-PageNumberFormat <String>]
[-PageSize <PdfPageSize>]
[-PdfOptions <PdfCreateOptions>]
[-Subject <String>]
[-Title <String>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Configure metadata, page numbers, and font embedding.
$options = New-OfficeWordPdfOptions -Title 'Service report' -Author 'Evotec' -IncludePageNumbers -AllowSystemFontEmbedding
Convert-OfficeDocument -Path .\Report.docx -To Pdf -OutputPath .\Report.pdf -Options $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.
- -ChartFidelity OfficeChartFidelity
- Chart handling: Strict (default) skips charts with formatting that cannot be drawn exactly; BestEffort draws the closest approximation and reports chart-approximation warnings.
- Possible values:
Strict,BestEffort - -DefaultTableBorders SwitchParameter
- Draw default borders for tables that do not specify borders.
- -FallbackOrientation OfficePageOrientation
- Fallback page orientation for sections without page settings.
- Possible values:
Portrait,Landscape - -FallbackPageSize PdfPageSize
- Fallback physical PDF page size for sections without page settings.
- -Font 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 OfficeLength
- Bottom page margin in PDF points.
- -MarginLeft OfficeLength
- Left page margin in PDF points.
- -MarginRight OfficeLength
- Right page margin in PDF points.
- -MarginTop OfficeLength
- Top page margin in PDF points.
- -Orientation OfficePageOrientation
- PDF page orientation.
- Possible values:
Portrait,Landscape - -PageNumberFormat String
- Page number text format.
- -PageSize PdfPageSize
- PDF page size.
- -PdfOptions PdfCreateOptions
- 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.