API Reference

Cmdlet

Remove-OfficePdfPage

Namespace PSWriteOffice
Inputs
None
Outputs
System.IO.FileInfo

Removes selected pages from a PDF and writes a new PDF.

Remarks

Removes selected pages from a PDF and writes a new PDF.

Examples

Authored help example

Remove draft pages from a PDF.

PS>


$proof = @(
                Remove-OfficePdfPage -Path .\Examples\Documents\Report.pdf -PageRange '4-5' -OutputPath .\Examples\Documents\Report-Clean.pdf
                Get-OfficePdfPreflight -Path .\Examples\Documents\Report-Clean.pdf
            )
            $proof
        

Deletes selected pages and preflights the rewritten PDF.

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

Remove-OfficePdfPage -OutputPath <String> -PageRange <String> -Path <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

OutputPath String requiredposition: namedpipeline: False
Output PDF path.
PageRange String requiredposition: namedpipeline: False
Page ranges such as 1-3,5.
Path String requiredposition: namedpipeline: Falsealiases: FilePath
Input PDF path.

Outputs

System.IO.FileInfo