API Reference

Cmdlet

Split-OfficePdf

Namespace PSWriteOffice
Inputs
None
Outputs
System.IO.FileInfo

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

Remarks

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

Examples

Authored help example

Split a PDF into page files.

PS>


$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.

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

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

Parameters

BookmarkName String[] optionalposition: namedpipeline: Falsealiases: Bookmark, BookmarkTitle
Create one PDF for each supplied bookmark title.
ByBookmark SwitchParameter optionalposition: namedpipeline: False
Create one PDF for every readable bookmark when -BookmarkName is not supplied.
IndexWidth Nullable`1 optionalposition: namedpipeline: False
Pad numeric split names to this explicit width.
OutputDirectory String requiredposition: 1pipeline: False
Output directory.
PadIndex SwitchParameter optionalposition: namedpipeline: False
Pad numeric split names to the width required by the source page count.
PageRange String[] optionalposition: namedpipeline: Falsealiases: PageRanges, Range
Create one PDF for each supplied page range or selection, such as 1-3 or 1,3.
PagesPerDocument Int32 optionalposition: namedpipeline: False
Create one PDF for each consecutive group with this many pages.
Password String optionalposition: namedpipeline: False
Password used to open an encrypted PDF.
Path String requiredposition: 0pipeline: Falsealiases: FilePath
Input PDF path.
Prefix String optionalposition: namedpipeline: False
Output file prefix.

Outputs

System.IO.FileInfo