# Move-OfficePdfPage

Move PDF pages through the native PDF engine. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Pdf.PdfDocument` `System.String[]`

**Outputs**

`OfficeIMO.Pdf.PdfDocument` `System.IO.FileInfo`

**Source**

[MoveOfficePdfPageCommand.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/MoveOfficePdfPageCommand.cs#L11) 

Move PDF pages through the native PDF engine.

## Syntax

```
Move-OfficePdfPage
-BeforePage <Int32>
[-Document <PdfDocument>]
-Page <OfficePageRange>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-move-officepdfpage-int32-pdfdocument-officepagerange-switchparameter-switchparameter-switchparameter)

Parameter set: `Document`

```
Move-OfficePdfPage
-BeforePage <Int32>
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-move-officepdfpage-int32-switchparameter-pdfloadoptions-string-officepagerange-switchparameter-securestring-string-switchparameter-switchparameter)

Parameter set: `Path`

```
Move-OfficePdfPage
-BeforePage <Int32>
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-move-officepdfpage-int32-switchparameter-pdfloadoptions-string-officepagerange-switchparameter-securestring-string-switchparameter-switchparameter-2)

Parameter set: `PathDirectory`

```
Move-OfficePdfPage
-BeforePage <Int32>
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputPath <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-move-officepdfpage-int32-switchparameter-string-pdfloadoptions-string-officepagerange-switchparameter-securestring-switchparameter-switchparameter)

Parameter set: `LiteralPath`

```
Move-OfficePdfPage
-BeforePage <Int32>
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
-OutputDirectory <String>
-Page <OfficePageRange>
[-PassThru]
[-Password <SecureString>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-move-officepdfpage-int32-switchparameter-string-pdfloadoptions-string-officepagerange-switchparameter-securestring-switchparameter-switchparameter-2)

Parameter set: `LiteralPathDirectory`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Merge, Split, and Reorder PDF Pages](/docs/pswriteoffice/pdf-merge-split-pages/) Guide
  
  Combine PDF files, normalize page sizes, split by page count, range, or bookmarks, and copy, move, or remove selected pages.

## Examples

### Example 1

```powershell
Move-OfficePdfPage -Page 'Value' -BeforePage 1
```

### Example 2

```powershell
Move-OfficePdfPage -Page 'Value' -BeforePage 1 -LiteralPath @('C:\Path') -OutputPath 'C:\Path'
```

### Example 3

```powershell
Move-OfficePdfPage -Page 'Value' -BeforePage 1 -LiteralPath @('C:\Path') -OutputDirectory 'Value'
```

## Parameters

**-BeforePage Int32 required**

One-based page before which selected pages are inserted; page count plus one appends.

**-Document PdfDocument optionalpipeline: True (ByValue)sets: Document**

Explicit native input; omission uses the enclosing New-/Open- content block.

**-Page OfficePageRange required**

Caller-ordered one-based pages or range expression.

**-PassThru SwitchParameter optional**

Emit the updated native document or each saved FileInfo.

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running the command.

**-IgnorePermissionRestrictions SwitchParameter optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory**

After authentication, explicitly ignore owner-imposed usage restrictions.

**-LoadOptions PdfLoadOptions optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory**

Native source parsing, authentication and resource settings.

**-OutputPath String requiredsets: Path, LiteralPath**

Single-file destination.

**-Password SecureString optionalsets: Path, PathDirectory, LiteralPath, LiteralPathDirectory**

Source password.

**-Path String[] requiredposition: 0sets: Path, PathDirectory**

Input files with FileSystem wildcard expansion.

**-OutputDirectory String requiredsets: PathDirectory, LiteralPathDirectory**

Destination folder retaining input file names.

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath, LiteralPathDirectory**

Literal input files, including FileInfo.FullName.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:D5FC65FB1C5EEE4FF149BAFB7240589B4B1F5EA93A8D66272CB03D368A542A35 -->
