# Set-OfficePdfElectronicInvoice

Configures Factur-X/ZUGFeRD e-invoice groundwork on a generated PDF document.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: PdfElectronicInvoice

**Module**

`PSWriteOffice`

**Aliases**

`PdfElectronicInvoice`

**Inputs**

`OfficeIMO.Pdf.PdfDocument`

**Outputs**

`OfficeIMO.Pdf.PdfDocument`

**Source**

[SetOfficePdfElectronicInvoiceCommand.cs:20](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Pdf/SetOfficePdfElectronicInvoiceCommand.cs#L20) 

Configures Factur-X/ZUGFeRD e-invoice groundwork on a generated PDF document.

## Syntax

```
Set-OfficePdfElectronicInvoice
[-ConformanceLevel <String>]
[-Description <String>]
[-PassThru]
[-Path] <String>
[-Profile <PdfComplianceProfile>]
[-Relationship <PdfAssociatedFileRelationship>]
[-Version <String>]
[<CommonParameters>]
```

[#](#method-set-officepdfelectronicinvoice-string-string-switchparameter-string-pdfcomplianceprofile-pdfassociatedfilerelationship-string)

Parameter set: `Context`

```
Set-OfficePdfElectronicInvoice
[-ConformanceLevel <String>]
[-Description <String>]
-Document <PdfDocument>
[-PassThru]
[-Path] <String>
[-Profile <PdfComplianceProfile>]
[-Relationship <PdfAssociatedFileRelationship>]
[-Version <String>]
[<CommonParameters>]
```

[#](#method-set-officepdfelectronicinvoice-string-string-pdfdocument-switchparameter-string-pdfcomplianceprofile-pdfassociatedfilerelationship-string)

Parameter set: `Document`

## Examples

### Attach CII XML as a Factur-X payload.

```powershell
New-OfficePdf -Path .\Examples\Documents\Invoice.pdf {
    Set-OfficePdfElectronicInvoice -Path .\Examples\Documents\factur-x.xml -Profile FacturX
    Add-OfficePdfHeading -Text 'Invoice'
}
```

Embeds the XML as canonical factur-x.xml, emits matching XMP metadata, and configures PDF/A-3 groundwork.

## Parameters

**-ConformanceLevel String optional**

Factur-X/ZUGFeRD conformance level written to XMP metadata.

**-Description String optional**

Optional human-readable attachment description.

**-PassThru SwitchParameter optional**

Emit the updated document.

**-Path String requiredposition: 0aliases: FilePath, InvoiceXmlPath, XmlPath**

CrossIndustryInvoice XML file path to embed as canonical factur-x.xml.

**-Profile PdfComplianceProfile optional**

E-invoice profile to prepare.

Possible values: `PdfA2B`, `PdfA2U`, `PdfA2A`, `PdfA3B`, `PdfA3U`, `PdfA3A`, `PdfUa1`, `FacturX`, `Zugferd`, `PdfA4`, `PdfA4E`, `PdfA4F`, `PdfUa2`, `PdfX1A2003`, `PdfX4`

**-Relationship PdfAssociatedFileRelationship optional**

Associated-file relationship for the embedded XML payload.

Possible values: `Unspecified`, `Source`, `Data`, `Alternative`, `Supplement`, `C2paManifest`

**-Version String optional**

Factur-X/ZUGFeRD schema version written to XMP metadata.

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

Compatibility parameter. Electronic-invoice options must be declared inside New-OfficePdf.

## 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).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:6E525E018EF2B734900C921C770A110CA15BB62FEE1EBEED41FBE33FA51C78EB -->
