# PEPPOL-EN16931-CL001: Declare an embedded attachment with one of the six Peppol MIME codes

Peppol accepts six MIME codes on an embedded attachment, the same six as `BR-CL-24`. A variant such as `application/x-pdf` fails both rules.

- Layer: Peppol BIS Billing
- Severity: fatal (the document is invalid)
- Topics: Code lists, Process and references
- Official definition: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/PEPPOL-EN16931-CL001/
- Explanation last updated: 2026-09-28

## The short answer

`PEPPOL-EN16931-CL001` fails when the `mimeCode` of a `cbc:EmbeddedDocumentBinaryObject` is not exactly one of the six codes Peppol permits for attachments: PDF, PNG, JPEG, CSV, Excel xlsx and OpenDocument spreadsheet. The recorded PDF was declared as `application/x-pdf`, an unregistered name some software still uses for PDF; the value to send is `application/pdf`.

This is the Peppol copy of `BR-CL-24`. Both rules hold the same six values and compare them the same way, so a value that fails one fails the other, and a single correction clears both.

## What the rule checks

Every embedded binary object that carries a `mimeCode` attribute is tested, and the finding points at that element.

The comparison is exact: no trimming and no case folding. When tried, `application/PDF`, ` application/pdf` with a leading space and an empty attribute each failed, and each was also reported by `BR-CL-24`.

Types of other formats fail even when they are registered MIME types. When tried, `application/vnd.ms-excel` for an older Excel workbook and `text/plain` were both rejected.

No value separates this rule from `BR-CL-24`: the two lists match entry for entry and neither rule trims the attribute, so in every case tried the two findings came together.

| Term | Meaning | UBL element |
|---|---|---|
| BT-125-1 | Attached document Mime code | `cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@mimeCode` |
| BT-125 | Attached document | `cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject` |

## How an integration ends up here

Possible causes, from the shape of the rule rather than from measured usage:

- A MIME library or an operating system table returns a legacy alias such as `application/x-pdf`.
- The type of the older binary Excel format, `application/vnd.ms-excel`, is sent for any spreadsheet.
- The attribute is copied from file metadata without normalising case or whitespace.
- A text or XML export is attached as it is, although neither type is on the list.

## How to fix it

1. Determine the format from the file content or a trusted extension check, not from whatever a library suggests.
2. Map the format through a fixed table to the six permitted values, so a PDF is always sent as `application/pdf`.
3. Convert any other format, such as a Word document or an `.xls` workbook, to PDF, xlsx or ods before embedding it, and change the file name to match.
4. Correct the value once, in the mapping; the EN 16931 and Peppol checks read the same attribute.

## Before and after

These are fragments, not complete documents. The complete synthetic documents they come from are linked below.

Fragment of the failing invoice: the PDF timesheet is declared as application/x-pdf

```xml
<cac:AdditionalDocumentReference>
  <cbc:ID>TIMESHEET-001</cbc:ID>
  <cbc:DocumentDescription>Timesheet</cbc:DocumentDescription>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="application/x-pdf" filename="timesheet.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
```

Fragment of the corrected invoice: the same file declared as application/pdf

```xml
<cac:AdditionalDocumentReference>
  <cbc:ID>TIMESHEET-001</cbc:ID>
  <cbc:DocumentDescription>Timesheet</cbc:DocumentDescription>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="timesheet.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
```

Only the `mimeCode` attribute differs: `application/x-pdf` in the failing invoice, `application/pdf` in the corrected one, for the same `timesheet.pdf` content. The failing document also reports `BR-CL-24` at the same element, the EN 16931 check against the same six values.

### What the validator reported

- The failing invoice reports [BR-CL-24](https://ironfang.com/docs/finance/rules/BR-CL-24.md) and **PEPPOL-EN16931-CL001**. The corrected document passes every layer with no findings.
  - [Download the failing XML](https://ironfang.com/finance/rule-examples/PEPPOL-EN16931-CL001-invalid.xml)
  - [Download the corrected XML](https://ironfang.com/finance/rule-examples/supporting-document-valid.xml)

Recorded on phive 12.1.0 / phive-rules-peppol 4.5.6 / Saxon-HE 12.10, the engine behind the free validator, using synthetic data. A recorded result is regression evidence for these documents; it is not a certification.

## Where it applies

- Applies to `Invoice` and `CreditNote`; when tried, an attachment declared as `application/x-pdf` in a credit note reported this rule and `BR-CL-24`.
- A Peppol BIS Billing 3.0 rule, reported on the Peppol layer with the code list of the pinned May 2026 release.
- An attachment without any `mimeCode` never reaches this rule: when tried, it failed the XSD layer, which requires the attribute.
- A document referenced by URL in `cac:ExternalReference` is not embedded, has no MIME code and is outside the rule.

## Related rules

- [BR-CL-24 applies the same six MIME codes on the EN 16931 layer](https://ironfang.com/docs/finance/rules/BR-CL-24.md)
- [UBL-DT-07 requires the filename attribute beside the MIME code](https://ironfang.com/docs/finance/rules/UBL-DT-07.md)
- [BR-52 requires an identifier on the supporting document that carries the file](https://ironfang.com/docs/finance/rules/BR-52.md)

## Scope and source

Written for Peppol BIS Billing 3.0.21 (May 2026), EN 16931 1.3.16, as applied to UBL 2.1 Invoice and CreditNote documents. Other profiles, syntaxes and releases can define this identifier differently. Guidance version 2026-09-28.1: source checked 2026-09-28, explanation last updated 2026-09-28.

[The official definition of PEPPOL-EN16931-CL001](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/PEPPOL-EN16931-CL001/) carries the normative wording and test. This page is our explanation of it, not a copy.

Guidance does not change the engine verdict. Fixing this finding does not mean the document passes every layer, and validation does not certify legal or tax compliance or transmit a document over Peppol.

## Links

- [This rule as a web page](https://ironfang.com/docs/finance/rules/PEPPOL-EN16931-CL001)
- [Free Peppol invoice validator](https://ironfang.com/tools/peppol-validator)
- [Rule index](https://ironfang.com/docs/finance/rules.md)
- [Ironfang Finance API docs](https://ironfang.com/docs/finance)
- The same rule is available to MCP clients as the tool `finance.rule.get` on https://mcp.ironfang.com/mcp
