Cmdlet
Split-OfficeDocument
Splits PDF files into consecutive groups, selected ranges or top-level bookmarked chapters.
Syntax
Split-OfficeDocument
[-IndexWidth <Int32>]
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
[-PageCount <Int32>]
[-Password <SecureString>]
[-Path] <String[]>
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
PathByPageCountSplit-OfficeDocument
[-IndexWidth <Int32>]
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
-Page <String[]>
[-Password <SecureString>]
[-Path] <String[]>
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
PathByRangeSplit-OfficeDocument
[-Bookmark <String[]>]
-ByBookmark
[-IndexWidth <Int32>]
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
[-Password <SecureString>]
[-Path] <String[]>
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
PathByBookmarkSplit-OfficeDocument
[-IndexWidth <Int32>]
-LiteralPath <String[]>
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
[-PageCount <Int32>]
[-Password <SecureString>]
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
LiteralPathByPageCountSplit-OfficeDocument
[-IndexWidth <Int32>]
-LiteralPath <String[]>
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
-Page <String[]>
[-Password <SecureString>]
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
LiteralPathByRangeSplit-OfficeDocument
[-Bookmark <String[]>]
-ByBookmark
[-IndexWidth <Int32>]
-LiteralPath <String[]>
[-NoClobber]
[-Options <Object[]>]
[-OutputDirectory] <String>
[-PadIndex]
[-Password <SecureString>]
[-Prefix <String>]
[-ThrottleLimit <Int32>]
[<CommonParameters>]#Parameter set:
LiteralPathByBookmarkDescription
Each completed file is returned immediately. Native page extraction retains its permission, signature and preservation policies. Only the selected files are written; other folder contents remain intact.
Examples
Split each incoming scan into two-page records.
Get-ChildItem ./Scans -Filter *.pdf | Split-OfficeDocument -OutputDirectory ./Records -PageCount 2 -NoClobberKeep nested sections inside their chapter.
Split-OfficeDocument -LiteralPath './Manual [final].pdf' -OutputDirectory ./Chapters -ByBookmarkParameters
- -IndexWidth Int32
- Explicit numeric index width, up to 32 characters.
- -NoClobber SwitchParameter
- Refuse to replace an existing part, including a file created by another writer.
- -Options Object[]
- Native PDF load settings or property overrides; includes resource and permission policies.
- -OutputDirectory String
- Destination folder. File names begin with Prefix or the source base name.
- -PadIndex SwitchParameter
- Pad numeric part indexes to the width of the source page count.
- -PageCount Int32
- Consecutive source pages per output; defaults to one.
- -Password SecureString
- Input password; accepts a credential or warned plain text.
- -Path String[]
- Input files in provider and pipeline order.
- -Prefix String
- Portable output file-name prefix; defaults to the source base name.
- -ThrottleLimit Int32
- Maximum concurrent input files.
- -Page String[]
- One output per range string, for example '1-3','4,6'.
- -Bookmark String[]
- Only these exact top-level bookmark titles; omission selects every chapter.
- -ByBookmark SwitchParameter
- Split at top-level bookmarks; nested pages remain within their chapter.
- -LiteralPath String[]
- Literal files; also binds FileInfo.FullName and provider PSPath properties.
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.