Hello,
Is there a way to embed a pdf document (Base64) into a XML file?
Something like this.
<cbc:EmbeddedDocumentBinaryObject filename="Factuur.pdf " mimeCode="application/pdf">JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2........
André Oostendorp
I hope this helps: https://tech.forums.softwareag.com/t/attaching-a-pdf-document-into-an-xml-message/134281
Hello,
Is there a way to embed a pdf document (Base64) into a XML file?
Something like this.
<cbc:EmbeddedDocumentBinaryObject filename="Factuur.pdf " mimeCode="application/pdf">JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2........
André Oostendorp
Yes, the binary document is encoded in base64 and treated like other data. XML is a character oriented standard, so binary cannot be embedded in an XML document without encoding into a character based encoding scheme, of which base64 is by far the most popular.
However, many specifications, including those promulgated by OASIS, have an attachment mechanism which places a reference to the binary document in the XML, and then places the binary file data in the same stream, using identifiers. I encountered this situation when adapting a Court Management System into a government-required LegalXML court document filing system.
Are you trying to follow the specification for a specific system?
Hello,
I got this working.
First I create the XML using C$XML.
I found a command line utiliy called Base64 to create the base64 string from the PDF file.
After that I recreate the XML file and incorporate the base64 string (and the necessaryXML tags) into the XML.