PD4ML v4 › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › how to force pdf download using jsp tag lib? This topic has 3 replies, 2 voices, and was last updated May 10, 201003:01:01 by PD4ML. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts smmansfield May 10, 2010 at 03:01 #26386 I would like to force a file download rather than displaying the pdf file using the jsp tag lib. Is this possible? I know it is accomplished using the following http header: Content-disposition: attachment; filename=name.ext where name.ext is the name of the pdf file. I see how to write out the pdf file to disk using pd4ml:savefile, but don’t see how to set the response header. Is there an easy way to do this that I am missing? PD4ML May 10, 2010 at 13:32 #28013 If you use PD4ML taglib, you can force “Content-disposition: attachment” header output by inline=”false” attribute of tag. With name attribute you may define a default name. smmansfield May 10, 2010 at 21:53 #28014 Thanks – this works fine except that I can’t control the file name. “name” is not attribute for pd4ml:transform. Do I need to use pd4ml:savefile? I am also having trouble using dynamic content within attributes. PD4ML May 11, 2010 at 13:24 #28015 My mistake. The correct attribute name is fileName See: http://www.pd4ml.com/taglib/pd4ml/transform.html Author Posts Viewing 4 posts - 1 through 4 (of 4 total) The forum ‘General questions / FAQ’ is closed to new topics and replies.