Until you mentioned it, I had never heard of EDIFact.
I am not sure why something that is supposed to be an ANSI ISO standard doesn't have a free API. It sounds like it is
the equivalent to charging for the IP protocol. Maybe I am wrong here. Maybe the charges are for variations
that orginzations add to EDI.
I did some poking around and it looks like there are many translators for sale on the net.
See references on this page for 'TrueCommerce' and 'B2B Gateway'
I also came across some viewers. I am not sure if they will help you or not. Hopefully they will.
As with the library you found, as it was mentioned earlier, I would shy away from something that was potentially cobbled together. Espcially when
working with production data.
Copy and paste EDI code into the page. This one does translate the code you posted, but I am not sure if it is useful.