Cmdlet
Save-OfficePdf
Saves an OfficeIMO.Pdf document.
Syntax
Save-OfficePdf [-Document] <PdfDocument> [-Open] [-OwnerPassword <String>] [-PassThru] [-Password <String>] [-Path] <String> [-Permission <Int32>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Use this command when a PDF is built in memory and saved later, or when a pipeline should continue with the saved file. The document is saved through the normal OfficeIMO.Pdf save path.
Examples
Build a PDF in memory and save it later.
$pdf = New-OfficePdf { PdfHeading 'Queued report'; PdfParagraph 'Generated in memory.' }
$pdf | Save-OfficePdf -Path .\QueuedReport.pdfCreates a PDF document object first, then saves it to disk.
Parameters
- -Document PdfDocument
- PDF document to save.
- -Open SwitchParameter
- Open the PDF after saving.
- -OwnerPassword String
- Optional owner password for the generated encrypted PDF.
- -PassThru SwitchParameter
- Emit the document for further processing.
- -Password String
- Password required to open the generated PDF.
- -Path String
- Destination PDF path.
- -Permission Int32
- Raw PDF Standard security permission bit mask. Defaults to allowing all standard operations.
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.