Working with soffice using buffers

I am using the soffice tool to convert .docx files to .pdf. It is possible to receive a buffer to convert and return a buffer in the output? Something like this: soffice --headless --convert-to pdf <Buffer 08 06 07...> and its returns a <Buffer 01 04 02...>.