EmbeddedFileBinaryObject

Ok, great. So that file I’m assuming is saved locally, or returned as a string?

If it’s the former, you can do something like this:

/** Get the contents of the file */
$file = file_get_contents("../path/to/file.pdf"); 

If it’s in a string already, then no need to do this as that step would load the file into a string for you. From there, you encode the string using Base64:

/** Take the file string and encode it using Base64 */
$data = base64_encode($file); `

When it comes to compiling the XML, you set the value of EmbeddedFileBinaryObject to the new base64 string.

I hope that helps?