Quoting Julien
The nice thing is that during resource serving you have access to the portlet request (since ResourceRequest extends PortletRequest) so you can read preferences of user and even the render parameters.
We have an example of resource serving here but it is for markup, not PDF:
http://anonsvn.jboss.org/repos/portal/modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller/RemoteControllerPortlet.java
Wrong forum. Resource serving is a JSR 286 feature