Convert PDF to Base64

SUGGESTED

I would like to send a PDF file to a external Web service, but I could not do it, so I know there is a possibility to send PDF  as base64 to WS, so the webservice decode this base64 in a PDF file.

I know how to decode a clob record in base64, but not how I do that with a PDF file, so my question is that, how I convert a PDF file in Base64 on X3?

If someone knows any alternative to that, please feel free to tell me