Set content disposition in Friends of Cake Pdf download

Hi,

I am using Friends of Cake / CakePdf to produce a pdf download. It is working fine but Chrome is not including the file extension in the download and the file is then opening in a text editor instead of a pdf reader when the user double clicks on it.

I think this is due to not having the content disposition set, but I can’t see anyway of adding the content disposition header to the download when using the plugin, I’m not sure how to access the response object in this case in order to add in the custom header I need.

Thanks in advance for any help with this.

Simon