# Convert EDIFACT INVOIC to PDF

Drop the EDIFACT INVOIC message and read it as an invoice: parties, lines and totals in the places you expect them. An INVOIC is a run of segments with no spaces and no labels.

Source: https://tally-stick.com/edifact-invoic-to-pdf

## Segments a person was never meant to read

EDIFACT was designed for a machine reading a fixed-width stream. Element meanings are agreed between trading partners, not fixed by the standard. Where a qualifier is partner specific, the raw segment is shown rather than a label invented for it. A guessed label reads as authoritative, and that is worse than no label at all.

## What you get out

- Buyer, supplier and delivery parties from the NAD segments
- Document number and dates from BGM and DTM
- Line items from LIN, IMD, QTY, PRI and MOA
- Tax from the TAX and MOA groups, per rate where the message carries it
- Totals from the UNS summary section

## Questions

### Which EDIFACT messages are handled?

INVOIC renders as an invoice. ORDERS, DESADV and REMADV are recognised too and are titled as an order, a despatch advice and a remittance advice, not as invoices.

### My file uses a different separator set.

The UNA segment is read when present and its separators are honoured. A truncated UNA is refused rather than guessed at, because a wrong separator silently splits the message in the wrong places.

### Why is one field showing a raw code?

Because its meaning is set by your trading partner agreement, not by the standard. Showing the code lets you look it up; inventing a label would let you trust the wrong reading.

## Related

- [EDIFACT INVOIC to Excel](https://tally-stick.com/edifact-invoic-to-excel)
- [X12 810 to PDF](https://tally-stick.com/x12-810-to-pdf)
- [X12 850 to PDF](https://tally-stick.com/x12-850-to-pdf)
- [CII to PDF](https://tally-stick.com/cii-to-pdf)

## How it works

The invoice is read on your own device. No file is uploaded, no account is required, and the fair usage limit is the only cap. Exports are PDF, Excel, CSV and JSON.
