I don't have a CMIS-enabled PRPC system handy to check this.
But I would suggest you try the following to answer your question (about 'pyStream' and 'pyFileName').
Put "Data-WorkAttach-ECM" into your Designer Studio Tree Structure like this:
Then click the 'Data-WorkAttach-ECM' node itself - this will bring back instances of this particular class on the right-hand side.
Open one of these instances to view the ruleform (if there is one): then do view XML.
If there isn't a Rule Form: the XML should be shown directly.
Look for the properties 'pyStream' and 'pyFilename'.
Since I don't have instances of this particular class on my system: I'll use an similar class ( in that it also holds file data) of "DATA-WORKATTACH-FILE" (for PRPC attachments, rather than those held externally in a Content Management System).
So , you can see the instances of the classes on the right - I'll open the 'PDF-PDFEXAMPLE-WORK C-19' here:
Here's a screenshot of the XML returned for this instance:
So: it looks like the 'pxAttachName' hold the local name of the file "Template.pdf" and 'pyAttachStream' holds a base64-encoded version of the binary data of the PDF.
I'm not sure I can validate exactly what properties you should expect to see : but maybe by checking a few instances of existing CMIS attachments you can confirm them.
Why BASE64 ? PRPC Clipboard Pages hold a Serialized Representation of the underlying data - and XML is used for this Serialized Represenation - an encoding scheme is needed to hold the data (you can't just 'blob' binary data into XML).
Does this help ?
By the way: just a sanity-check - the code you posted using 'PRFile' - which writes files to the Server-Side (under 'ServiceExport' typically in 'PegaTemp') rather than streaming it to the browser : is that what you expected to happen ? (It looks like this code writes the data to a file on the server-side; and in order to 'get at' this file, you would need to stream from the backend: there are other ways of streaming file-data directly back to the browser : see Code-Pega-PDF.View for instance).