# Import-OfficePdfXfdf

Imports bounded DTD-free XFDF into native PDF forms, with atomic file output or a caller-owned live result.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

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

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[ImportOfficePdfXfdfCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Pdf/ImportOfficePdfXfdfCommand.cs#L15) 

Imports bounded DTD-free XFDF into native PDF forms, with atomic file output or a caller-owned live result.

## Syntax

```
Import-OfficePdfXfdf
[-Document <PdfDocument>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
[-PassThru]
-Xfdf <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-pdfdocument-int64-object-switchparameter-string-switchparameter-switchparameter)

Parameter set: `Document`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Xfdf <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-pdfloadoptions-int64-object-string-switchparameter-securestring-string-string-switchparameter-switchparameter)

Parameter set: `Path`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-Xfdf <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-pdfloadoptions-int64-object-string-switchparameter-securestring-string-string-switchparameter-switchparameter-2)

Parameter set: `PathDirectory`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-XfdfPath <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-pdfloadoptions-int64-object-string-switchparameter-securestring-string-string-switchparameter-switchparameter-3)

Parameter set: `PathFile`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
[-Path] <String[]>
-XfdfPath <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-pdfloadoptions-int64-object-string-switchparameter-securestring-string-string-switchparameter-switchparameter-4)

Parameter set: `PathFileDirectory`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-Xfdf <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-string-pdfloadoptions-int64-object-string-switchparameter-securestring-string-switchparameter-switchparameter)

Parameter set: `LiteralPath`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputPath <String>
[-PassThru]
[-Password <SecureString>]
-XfdfPath <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-string-pdfloadoptions-int64-object-string-switchparameter-securestring-string-switchparameter-switchparameter-2)

Parameter set: `LiteralPathFile`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-Xfdf <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-string-pdfloadoptions-int64-object-string-switchparameter-securestring-string-switchparameter-switchparameter-3)

Parameter set: `LiteralPathDirectory`

```
Import-OfficePdfXfdf
[-IgnorePermissionRestrictions]
-LiteralPath <String[]>
[-LoadOptions <PdfLoadOptions>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
-OutputDirectory <String>
[-PassThru]
[-Password <SecureString>]
-XfdfPath <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-switchparameter-string-pdfloadoptions-int64-object-string-switchparameter-securestring-string-switchparameter-switchparameter-4)

Parameter set: `LiteralPathFileDirectory`

```
Import-OfficePdfXfdf
[-Document <PdfDocument>]
[-MaxXfdfSize <Int64>]
[-Options <Object[]>]
[-PassThru]
-XfdfPath <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-import-officepdfxfdf-pdfdocument-int64-object-switchparameter-string-switchparameter-switchparameter-2)

Parameter set: `DocumentFile`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Fill and Flatten PDF Forms](/docs/pdf/forms/) Guide
  
  List AcroForm fields, fill them by name, flatten the result, exchange XFDF data, and add form fields to new PDFs with OfficeIMO.Pdf and PSWriteOffice.

## Examples

### Fill a literal file from XFDF.

```powershell
Import-OfficePdfXfdf -LiteralPath './Form[1].pdf' -XfdfPath ./Values.xfdf -OutputPath ./Completed.pdf
```

## Parameters

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

Native caller-owned PDF; omission uses the enclosing content block.

**-MaxXfdfSize Int64 optional**

MaxXfdfSize setting.

**-Options Object[] optional**

Options setting.

**-PassThru SwitchParameter optional**

Return the changed, caller-owned PDF document. Dispose it when finished.

**-Xfdf String requiredpipeline: True (ByValue)sets: Document, Path, PathDirectory, LiteralPath, LiteralPathDirectory**

Xfdf setting.

**-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, PathFile, PathFileDirectory, LiteralPath, LiteralPathFile, LiteralPathDirectory, LiteralPathFileDirectory**

IgnorePermissionRestrictions setting.

**-LoadOptions PdfLoadOptions optionalsets: Path, PathDirectory, PathFile, PathFileDirectory, LiteralPath, LiteralPathFile, LiteralPathDirectory, LiteralPathFileDirectory**

Native parsing, authentication and resource policy.

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

Single-file destination.

**-Password SecureString optionalsets: Path, PathDirectory, PathFile, PathFileDirectory, LiteralPath, LiteralPathFile, LiteralPathDirectory, LiteralPathFileDirectory**

Password setting.

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

Input PDF paths with wildcard expansion.

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

Batch destination retaining source names.

**-XfdfPath String requiredsets: PathFile, PathFileDirectory, LiteralPathFile, LiteralPathFileDirectory, DocumentFile**

XfdfPath setting.

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

Literal input PDF paths; accepts 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:2C6F02A741136006562087E373C32A6C4019125A5E7EF0CAA3A0C0B5214B476D -->
