PHPackages                             horstoeko/zugferdublbridge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. horstoeko/zugferdublbridge

ActivePackage[Payment Processing](/categories/payments)

horstoeko/zugferdublbridge
==========================

Convert Factur-X/ZUGFeRD (CII-Syntax) to PEPPOL (UBL-Syntax) and visa versa

v1.0.16(5mo ago)16135.6k↓15.9%43MITPHPPHP &gt;=7.3CI passing

Since Aug 8Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/horstoeko/zugferdublbridge)[ Packagist](https://packagist.org/packages/horstoeko/zugferdublbridge)[ Docs](https://github.com/horstoeko/zugferdublbridge)[ RSS](/packages/horstoeko-zugferdublbridge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (21)Used By (3)

ZUGFeRD/Factur-X (CII-Syntax) to PEPPOL (UBL-Syntax)
====================================================

[](#zugferdfactur-x-cii-syntax-to-peppol-ubl-syntax)

[![Latest Stable Version](https://camo.githubusercontent.com/1c0bf23be82dfb7736a2ef49cdc34ae11c202455be83ad93824203a499789207/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f7273746f656b6f2f7a75676665726475626c6272696467652e7376673f7374796c653d706c6173746963)](https://packagist.org/packages/horstoeko/zugferdublbridge)[![PHP version](https://camo.githubusercontent.com/19699c7c68fd6445cbaae0ea42705824a6e0a6a72c338e9a058b171da6866eec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686f7273746f656b6f2f7a75676665726475626c6272696467652e7376673f7374796c653d706c6173746963)](https://packagist.org/packages/horstoeko/zugferdublbridge)[![License](https://camo.githubusercontent.com/951d16907c06f39f5710f4bea7f0962cafd12a33befa8207f9441da650e54b2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f686f7273746f656b6f2f7a75676665726475626c6272696467652e7376673f7374796c653d706c6173746963)](https://packagist.org/packages/horstoeko/zugferdublbridge)

[![Build Status](https://github.com/horstoeko/zugferdublbridge/actions/workflows/build.ci.yml/badge.svg)](https://github.com/horstoeko/zugferdublbridge/actions/workflows/build.ci.yml)[![Release Status](https://github.com/horstoeko/zugferdublbridge/actions/workflows/build.release.yml/badge.svg)](https://github.com/horstoeko/zugferdublbridge/actions/workflows/build.release.yml)

Table of Contents
-----------------

[](#table-of-contents)

- [ZUGFeRD/Factur-X (CII-Syntax) to PEPPOL (UBL-Syntax)](#zugferdfactur-x-cii-syntax-to-peppol-ubl-syntax)
    - [Table of Contents](#table-of-contents)
    - [License](#license)
    - [Overview](#overview)
    - [Further information](#further-information)
    - [Related projects](#related-projects)
    - [Dependencies](#dependencies)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Convert CII to UBL](#convert-cii-to-ubl)
            - [From XML file to XML file](#from-xml-file-to-xml-file)
            - [From XML string to XML file](#from-xml-string-to-xml-file)
            - [From XML file to XML string](#from-xml-file-to-xml-string)
        - [Convert UBL to CII](#convert-ubl-to-cii)
            - [From XML file to XML file](#from-xml-file-to-xml-file-1)
            - [From XML string to XML file](#from-xml-string-to-xml-file-1)
            - [From XML file to XML string](#from-xml-file-to-xml-string-1)
    - [Usage with `horstoeko/zugferd`](#usage-with-horstoekozugferd)
        - [CII to UBL](#cii-to-ubl)
        - [UBL to CII](#ubl-to-cii)

License
-------

[](#license)

The code in this project is provided under the [MIT](https://opensource.org/licenses/MIT) license.

Overview
--------

[](#overview)

Caution

This library is currently still considered experimental and should therefore be used with caution. I would be happy for an issue to be posted if bugs are found.

With `horstoeko/zugferdublbridge` you can convert the Factur-X/ZUGFeRD-CII-Syntax to PEPPOL UBL-Syntax and visa versa.

Further information
-------------------

[](#further-information)

- [ZUGFeRD](https://de.wikipedia.org/wiki/ZUGFeRD) (German)
- [XRechnung](https://de.wikipedia.org/wiki/XRechnung) (German)
- [Factur-X](http://fnfe-mpe.org/factur-x/factur-x_en) (France)

Related projects
----------------

[](#related-projects)

- [horstoeko/zugferd](https://github.com/horstoeko/zugferd)

Dependencies
------------

[](#dependencies)

This package has no dependencies.

Installation
------------

[](#installation)

There is one recommended way to install `horstoeko/zugferdublbridge` via [Composer](https://getcomposer.org/):

- adding the dependency to your `composer.json` file:

```
  "require": {
      ..
      "horstoeko/zugferdublbridge":"^1",
      ..
  },
```

Usage
-----

[](#usage)

For detailed eplanation you may have a look in the [examples](https://github.com/horstoeko/zugferdublbridge/tree/master/examples) of this package and the documentation attached to every release.

### Convert CII to UBL

[](#convert-cii-to-ubl)

#### From XML file to XML file

[](#from-xml-file-to-xml-file)

```
use horstoeko\zugferdublbridge\XmlConverterCiiToUbl;

$sourceXmlFilename = '/path/to/cii.xml.file';
$destinationXmlFilename = '/path/to/ubl.xml.file'

XmlConverterCiiToUbl::fromFile($sourceXmlFilename)->convert()->saveXmlFile($destinationXmlFilename);
```

#### From XML string to XML file

[](#from-xml-string-to-xml-file)

```
use horstoeko\zugferdublbridge\XmlConverterCiiToUbl;

$xmlContent = '....';
$destinationXmlFilename = '/path/to/ubl.xml.file'

XmlConverterCiiToUbl::fromString($xmlContent)->convert()->saveXmlFile($destinationXmlFilename);
```

#### From XML file to XML string

[](#from-xml-file-to-xml-string)

```
use horstoeko\zugferdublbridge\XmlConverterCiiToUbl;

$sourceXmlFilename = '/path/to/cii.xml.file';

$converterXmlString = XmlConverterCiiToUbl::fromFile($sourceXmlFilename)->convert()->saveXmlString();
```

### Convert UBL to CII

[](#convert-ubl-to-cii)

#### From XML file to XML file

[](#from-xml-file-to-xml-file-1)

```
use horstoeko\zugferdublbridge\XmlConverterUblToCii;

$sourceXmlFilename = '/path/to/ubl.xml.file';
$destinationXmlFilename = '/path/to/cii.xml.file'

XmlConverterUblToCii::fromFile($sourceXmlFilename)->convert()->saveXmlFile($destinationXmlFilename);
```

#### From XML string to XML file

[](#from-xml-string-to-xml-file-1)

```
use horstoeko\zugferdublbridge\XmlConverterUblToCii;

$xmlContent = '....';
$destinationXmlFilename = '/path/to/cii.xml.file'

XmlConverterUblToCii::fromString($xmlContent)->convert()->saveXmlFile($destinationXmlFilename);
```

#### From XML file to XML string

[](#from-xml-file-to-xml-string-1)

```
use horstoeko\zugferdublbridge\XmlConverterUblToCii;

$sourceXmlFilename = '/path/to/ubl.xml.file';

$converterXmlString = XmlConverterUblToCii::fromFile($sourceXmlFilename)->convert()->saveXmlString();
```

Usage with `horstoeko/zugferd`
------------------------------

[](#usage-with-horstoekozugferd)

### CII to UBL

[](#cii-to-ubl)

You can convert the output of `horstoko/zugferd` to UBL using this library:

```
use horstoeko\zugferd\ZugferdDocumentBuilder;
use horstoeko\zugferd\ZugferdProfiles;
use horstoeko\zugferd\codelists\ZugferdPaymentMeans;
use horstoeko\zugferdublbridge\XmlConverterCiiToUbl;

$document = ZugferdDocumentBuilder::CreateNew(ZugferdProfiles::PROFILE_EN16931);
$document
    ->setDocumentInformation("471102", "380", \DateTime::createFromFormat("Ymd", "20180305"), "EUR")
    ----

$destinationXmlFilename = '/path/to/ubl.xml.file'

XmlConverterCiiToUbl::fromString($document->getContent())->convert()->saveXmlFile($destinationXmlFilename);
```

### UBL to CII

[](#ubl-to-cii)

You can convert a UBL document and handle it with `horstoko/zugferd`

```
use horstoeko\zugferd\ZugferdDocumentReader;
use horstoeko\zugferdublbridge\XmlConverterUblToCii;

$sourceXmlFilename = '/path/to/ubl.xml.file';

$converterXmlString = XmlConverterUblToCii::fromFile($sourceXmlFilename)->convert()->saveXmlString();

$document = ZugferdDocumentReader::readAndGuessFromContent($converterXmlString);

$document->getDocumentInformation(
    $documentno,
    $documenttypecode,
    $documentdate,
    $duedate,
    $invoiceCurrency,
    $taxCurrency,
    $documentname,
    $documentlanguage,
    $effectiveSpecifiedPeriod
);

echo "The Invoice No. is {$documentno}" . PHP_EOL;
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance80

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~75 days

Total

17

Last Release

152d ago

PHP version history (2 changes)v1.0.0PHP ^7.3|^7.4|^8

v1.0.11PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/24de09032b9a378d782bb7eac3f60914f64967e5a68d51527439dcf7c51711ba?d=identicon)[horstoeko](/maintainers/horstoeko)

---

Top Contributors

[![horstoeko](https://avatars.githubusercontent.com/u/2326713?v=4)](https://github.com/horstoeko "horstoeko (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![yogi70](https://avatars.githubusercontent.com/u/655697?v=4)](https://github.com/yogi70 "yogi70 (4 commits)")[![Guite](https://avatars.githubusercontent.com/u/277531?v=4)](https://github.com/Guite "Guite (1 commits)")[![MarvinG92](https://avatars.githubusercontent.com/u/191968547?v=4)](https://github.com/MarvinG92 "MarvinG92 (1 commits)")

---

Tags

bridgeciicross-industry-invoiceelectronic-invoicesen16931factur-xphpphp7php8ublxrechnungzugferdconvertinvoiceelectronicZUGFeRDfactur-xxrechnungublcii

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/horstoeko-zugferdublbridge/health.svg)

```
[![Health](https://phpackages.com/badges/horstoeko-zugferdublbridge/health.svg)](https://phpackages.com/packages/horstoeko-zugferdublbridge)
```

###  Alternatives

[horstoeko/zugferd

A library for creating and reading european electronic invoices

4174.3M18](/packages/horstoeko-zugferd)[horstoeko/zugferd-laravel

A library for Laravel-Framework for creating and reading european electronic invoices

3693.6k2](/packages/horstoeko-zugferd-laravel)[atgp/factur-x

PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files

138825.5k3](/packages/atgp-factur-x)[josemmo/einvoicing

Library for reading and creating European-compliant electronic invoices (EN 16931)

173279.6k2](/packages/josemmo-einvoicing)[num-num/ubl-invoice

A modern object-oriented PHP library to create and read valid UBL and EN 16931/Peppol BIS 3.0 files

135820.5k](/packages/num-num-ubl-invoice)[easybill/e-invoicing

A package to read and create EN16931 e-invoices or CIUS like: XRechnung, ZUGFeRD etc.

12122.5k](/packages/easybill-e-invoicing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
