Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Split-OfficePdf

Module
PSWriteOffice
Inputs
None
Outputs
System.IO.FileInfo

Splits a PDF into page, range, count, or bookmark files.

Syntax

Split-OfficePdf
[-BookmarkName <String[]>]
[-ByBookmark]
[-IgnorePermissionRestrictions]
[-IndexWidth <Int32>]
[-OutputDirectory] <String>
[-PadIndex]
[-PageRange <String[]>]
[-PagesPerDocument <Int32>]
[-Password <String>]
[-Path] <String>
[-Prefix <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Split a PDF into page files.

$pages = Split-OfficePdf -Path .\Examples\Documents\Combined.pdf -OutputDirectory .\Examples\Documents\Pages -Prefix 'combined-page'
$pages | Select-Object Name, Length

Creates one output PDF for each page and returns the written files.

Parameters

-BookmarkName String[] optionalaliases: Bookmark, BookmarkTitle
Create one PDF for each supplied bookmark title.
-ByBookmark SwitchParameter optional
Create one PDF for every readable bookmark when -BookmarkName is not supplied.
-IgnorePermissionRestrictions SwitchParameter optional
After successful password authentication, explicitly ignore owner-imposed assembly restrictions.
-IndexWidth Int32 optional
Pad numeric split names to this explicit width.
-OutputDirectory String requiredposition: 1
Output directory.
-PadIndex SwitchParameter optional
Pad numeric split names to the width required by the source page count.
-PageRange String[] optionalaliases: PageRanges, Range
Create one PDF for each supplied page range or selection, such as 1-3 or 1,3.
-PagesPerDocument Int32 optional
Create one PDF for each consecutive group with this many pages.
-Password String optional
Password used to open an encrypted PDF.
-Path String requiredposition: 0aliases: FilePath
Input PDF path.
-Prefix String optional
Output file prefix.

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.