Well, no, Java supports writing an output stream to any file whatsoever. That's not restricted to text; if you're writing text
you should use a Writer anyway, not an OutputStream.
So what's in that "output stream"? Presumably it's not data in PDF format, or you would already have tried writing it to a file with success and you wouldn't be waiting for help here. In which case, you're going to have to do something to convert it to PDF format.