Also curious to know if you are uploading the PDF, how the method get_Stream works for you, here framework doesn't allows you to read Xstring format.
Get stream is used to read the media.
I hope you should redefine create_stream method to read the PDF in xstring and then further pass it to your FM, as it takes file path and content as Input.
Regards,
Tarun