Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Send-OfficePrinter

Aliases: Send-OfficePdfPrinter
Module
PSWriteOffice
Aliases
Send-OfficePdfPrinter
Inputs
System.String[]
Outputs
OfficeIMO.Workflows.PdfPrintSubmission

Prints a document of any format OfficeIMO converts to PDF on an explicitly named printer queue or IPP printer. Requires PowerShell 7.4 or newer.

Syntax

Send-OfficePrinter
[-Copies <Int32>]
[-Dpi <Double>]
[-Duplex <PrinterDefault|SingleSided|LongEdge|ShortEdge>]
[-Grayscale]
[-Margin <OfficeLength>]
[-Orientation <Portrait|Landscape>]
[-OutputPath <String>]
[-Page <OfficePageSelector>]
[-PagesPerSheet <1|2|4|6|9>]
[-PageSubset <All|Odd|Even>]
[-PaperSize <OfficePageSize>]
[-PaperSourceId <String>]
[-Password <SecureString>]
[-Path] <String[]>
-PrinterName <String>
[-RasterizeGrayscale]
[-ScaleMode <Fit|ActualSize|Fill>]
[<CommonParameters>]
#
Parameter set: Path
Send-OfficePrinter
[-Copies <Int32>]
[-Dpi <Double>]
[-Duplex <PrinterDefault|SingleSided|LongEdge|ShortEdge>]
[-Grayscale]
-LiteralPath <String[]>
[-Margin <OfficeLength>]
[-Orientation <Portrait|Landscape>]
[-OutputPath <String>]
[-Page <OfficePageSelector>]
[-PagesPerSheet <1|2|4|6|9>]
[-PageSubset <All|Odd|Even>]
[-PaperSize <OfficePageSize>]
[-PaperSourceId <String>]
[-Password <SecureString>]
-PrinterName <String>
[-RasterizeGrayscale]
[-ScaleMode <Fit|ActualSize|Fill>]
[<CommonParameters>]
#
Parameter set: LiteralPath

Description

PDF files are printed directly; other documents are converted to PDF in memory first, and conversion warnings are written as warnings. Send-OfficePdfPrinter remains an alias of this command. PrinterName accepts an installed queue name or an ipp:// or ipps:// printer URI.

Without PaperSize, sheets use the printer's default media. The returned receipt proves queue acceptance, not physical delivery. Follow it with Get-OfficePrintJob, and check the queue after an interrupted submission before retrying.

Examples

Print selected PDF pages as two pages per sheet.

Send-OfficePrinter -Path .\Report.pdf -PrinterName 'Office printer' -Page '1-3' -PagesPerSheet 2 -Duplex LongEdge

Print a Word document to an IPP printer and wait for it to finish.

Send-OfficePrinter -Path .\Letter.docx -PrinterName 'ipp://printer.local/ipp/print' | Get-OfficePrintJob -Wait

Print odd pages four to a sheet in grayscale.

Send-OfficePrinter -Path .\Report.pdf -PrinterName 'Office printer' -PageSubset Odd -PagesPerSheet 4 -Grayscale

Parameters

-Copies Int32 optional
Copies submitted to the queue.
-Dpi Double optional
Highest resolution used when sheets are rasterized for delivery.
-Duplex String optional
Duplex setting.
Possible values: PrinterDefault, SingleSided, LongEdge, ShortEdge
-Grayscale SwitchParameter optional
Print in grayscale, regardless of the device's color support. IPP printers and CUPS queues reached over IPP that list monochrome printing receive the vector PDF and convert it to gray themselves; others receive gray raster sheets.
-Margin OfficeLength optional
Printable margin in points.
-Orientation OfficePageOrientation optional
Paper orientation. When omitted, each sheet takes the orientation that places its pages largest, so two-up and six-up sheets of portrait pages print in landscape.
Possible values: Portrait, Landscape
-OutputPath String optionalaliases: OutputFilePath
New destination file for a Windows file printer.
-Page OfficePageSelector optionalaliases: Pages
Page selection such as 1-3,last.
-PagesPerSheet Int32 optional
Source pages per sheet, in row-major order.
Possible values: 1, 2, 4, 6, 9
-PageSubset String optional
Keep all selected pages, or only odd or even original page numbers.
Possible values: All, Odd, Even
-PaperSize OfficePageSize optional
Paper size. Defaults to the printer's default media, or A4 when the printer reports none.
-PaperSourceId String optional
Paper source identifier reported by Get-OfficePrinterCapability.
-Password SecureString optional
Password for an encrypted PDF; printing permissions remain enforced.
-Path String[] requiredposition: 0sets: Path
Local document to print: PDF or any format OfficeIMO converts to PDF.
-PrinterName String required
Installed queue from Get-OfficePrinter, or an ipp:// or ipps:// printer URI.
-RasterizeGrayscale SwitchParameter optional
With Grayscale, always send gray raster sheets, so the printout matches the preview pixel for pixel. Slower than letting the printer convert vector PDF. Windows queues always receive raster sheets.
-ScaleMode String optional
Scaling of source pages.
Possible values: Fit, ActualSize, Fill
-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal document paths, including FileInfo.FullName.

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.