# Embed PDF (PDF/A-3)

Drop your PDF and the invoice XML, in any order. When both are in, the page builds one file on its own: your PDF, with factur-x.xml inside it.

Source: https://tally-stick.com/attach-xml-to-pdf

## How it works

Your PDF is not rebuilt. The file is extended the way PDF updates work: the pages stay byte for byte what your software wrote, and the invoice is added as factur-x.xml with the metadata receiving software looks for in a ZUGFeRD / Factur-X hybrid.

The XML side is the UN/CEFACT CII syntax at the EN 16931 profile, the same attachment [Excel to ZUGFeRD](https://tally-stick.com/excel-to-zugferd) and [Create XRechnung](https://tally-stick.com/create-xrechnung) write. If you have neither yet, write the XML first: this tool does not translate between invoice syntaxes.

Nothing is uploaded. The hybrid is assembled in your own browser, under the site's fair usage limit. A PDF that is encrypted, already carries an attachment, or cannot be read is refused with the reason named, never half-processed.

## Standards it can write

A **Standard** selector picks what the file declares. The default is XRechnung 3.0. The choice is remembered in this browser and shared by the three writing tools, and it also sets the usual currency, decides whether a Leitweg-ID applies, and drives how many decimal places the amounts carry: a JPY invoice is written without them.

| Standard | CustomizationID | ProfileID |
| --- | --- | --- |
| XRechnung 3.0 (Germany) | `urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0` | `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0` |
| NLCIUS / SI-UBL 2.0 (Netherlands) | `urn:cen.eu:en16931:2017#compliant#urn:fdc:nen.nl:nlcius:v1.0` | `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0` |
| Peppol BIS Billing 3.0 (Europe and international) | `urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0` | `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0` |
| EN 16931 (no national rules) | `urn:cen.eu:en16931:2017` | not written |
| Peppol PINT A-NZ (Australia, New Zealand) | `urn:peppol:pint:billing-1@aunz-1` | `urn:peppol:bis:billing` |
| Peppol PINT Japan | `urn:peppol:pint:billing-1@jp-1` | `urn:peppol:bis:billing` |
| Peppol PINT Malaysia | `urn:peppol:pint:billing-1@my-1` | `urn:peppol:bis:billing` |
| Peppol PINT Singapore (InvoiceNow) | `urn:peppol:pint:billing-1@sg-1` | `urn:peppol:bis:billing` |
| Peppol PINT United Arab Emirates | `urn:peppol:pint:billing-1@ae-1` | `urn:peppol:bis:billing` |

The invoice body is EN 16931 in every case. What the standard changes is the two identifiers, the currency rounding, whether a Leitweg-ID applies, the scheme the electronic address is registered under, and which identifiers a national rule insists on: NLCIUS refuses an invoice without a KVK or OIN number on both parties and without a means of payment.

## What is checked before anything is written

Both files are checked before anything is written. The PDF must be a readable, unencrypted PDF that carries no embedded file yet, and the XML must be a CII invoice. A refusal names its reason and your original file is left untouched, because the update never rewrites it.

## Common questions

### Will my PDF look different?

No. Your pages are carried over byte for byte: the update appends the invoice, the metadata and the new cross-reference, so on screen and on paper everything is exactly what your software produced.

### Which PDF should I use?

The best input is a PDF your software exported as PDF/A, and the best of all is one without attachments or protection. An encrypted PDF, or one that already carries an embedded file, is refused rather than half-processed.

### Where does the XML come from?

Write it with [Excel to ZUGFeRD](https://tally-stick.com/excel-to-zugferd), or type the invoice on [Create XRechnung](https://tally-stick.com/create-xrechnung). The attachment is UN/CEFACT CII, which is what ZUGFeRD 2.x and Factur-X carry; UBL or FatturaPA files are not converted.

### Is this the same file Excel to ZUGFeRD writes?

That tool builds the whole PDF, letterhead to totals, as a PDF/A-3B file. This one keeps your own layout and adds the invoice to it. When you do not need your own PDF's look, the Excel route is the simpler one.

## Related tools

- [Excel to ZUGFeRD](https://tally-stick.com/excel-to-zugferd)
- [Create XRechnung](https://tally-stick.com/create-xrechnung)
- [ZUGFeRD to Excel](https://tally-stick.com/zugferd-to-excel)
- [Factur-X to Excel](https://tally-stick.com/factur-x-to-excel)
