1
0
-1

Hello

I need to generate a xml file with a pdf file content included

an example I have :

----------------------------------------------------

<cac:Attachment>

<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf">UEsDBBQAAAAIAOxTskgQN   ......

</cbc:EmbeddedDocumentBinaryObject>

----------------------------------------------------

Wich type of field, length do I have to use , and  for loading the pdf file into this field : fileload/raw ?


Dominique


    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      https://stackoverflow.com/questions/4517277/send-pdf-file-in-xml-message

      suggests:

      You can transform the PDF file to Base64 Binary and wrap this into a container Element with type xs:base64Binary.


      A more detailed post you can find in

      https://www.experts-exchange.com/questions/24902224/Attach-PDF-File-to-an-XML-File.html

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Thanks for answers

        saved me time


        Dominique

          CommentAdd your comment...
        1.  
          1
          0
          -1

          Hi,

          ULI is right, you must encode raw data in BASE64 .

          if I remember correctly we do something like this :

          Variables

          raw content

          endvariables

          lfileload/raw pdffile,content

          stringfield.ENTITY=$encode("BASE64",pdfile)

          xmlsave "ENTITY","DTD"

          or

          UXMLWRITER.CHARACTERS(stringfield)

          Gilles.

            CommentAdd your comment...