Can you give some detail as to why you are using a plugin?
We have used this functionality in Ribbon Buttons (render a specific report as a pdf), as well as in Custom Workflow steps.
(After reading the Proposed Answer and thinking about it, I'm not sure if we've done this in an OnLine instance)