I am using the MapFish GeoServer plugin for printing maps from GeoServer. It was working just fine.
For security reasons, I added an authentication plugin that needs an "authkey" parameter to access the layers. The problem is that I am not able to pass the parameters while printing the pdf. And I could not find any alternative method.
The example URL of the WFS layer with "authkey" is:
http://localhost:8080/geoserver/wms/reflect?format=application/openlayers&layers=world:worldmap&authkey=authkeyhere
And the URL for printing is:
http://localhost:8080/geoserver/pdf/worldmap.pdf