Cmdlet
Split-OfficePdf
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 SetsExamples
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, LengthCreates one output PDF for each page and returns the written files.
Parameters
- -BookmarkName String[]
- Create one PDF for each supplied bookmark title.
- -ByBookmark SwitchParameter
- Create one PDF for every readable bookmark when -BookmarkName is not supplied.
- -IgnorePermissionRestrictions SwitchParameter
- After successful password authentication, explicitly ignore owner-imposed assembly restrictions.
- -IndexWidth Int32
- Pad numeric split names to this explicit width.
- -OutputDirectory String
- Output directory.
- -PadIndex SwitchParameter
- Pad numeric split names to the width required by the source page count.
- -PageRange String[]
- Create one PDF for each supplied page range or selection, such as 1-3 or 1,3.
- -PagesPerDocument Int32
- Create one PDF for each consecutive group with this many pages.
- -Password String
- Password used to open an encrypted PDF.
- -Path String
- Input PDF path.
- -Prefix String
- 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.