HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › IE8 PDF wont download
- This topic has 3 replies, 3 voices, and was last updated Oct 04, 2012
12:54:43 byAnonymous.
-
AuthorPosts
-
September 19, 2012 at 16:26#26781
I am using PD4ML 380fx6 taglibs which generates a PDF. This works fine in Chrome, Firefox and IE9 +.
But when I do it in IE8 I get the attached error.
This is the transform tag I am using
<pd4ml:transform screenWidth="1100" pageFormat="A4" pageOrientation="portrait" pageInsets="15,15,15,15,points" inline="false" generateHyperlinks="false" debug="true" outline="headings" fileName="Report.pdf"> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
Http Response headers
Cache-Control:private Cache-Control:no-cache Connection:close Content-disposition:attachment; filename=Report.pdf Content-Length:10646 Content-Type:application/pdf Date:Wed, 19 Sep 2012 16:07:16 GMT Expires:0 Pragma:no-cache Pragma:cache Server:Apache-Coyote/1.1
Anyone have any ideas?
September 19, 2012 at 16:37September 24, 2012 at 18:04#29124It looks like the problem is caused by a caching of documents, downloaded by HTTPS. Please correct if I am wrong.
It was a known issue of older PD4ML JSP taglib versions, until we found a safe HTTP header directives set.Currently PD4ML taglib sets only the following HTTP cache control directives:
((HttpServletResponse) sr).setHeader("Pragma", "cache"); ((HttpServletResponse) sr).setHeader("Expires", "0"); ((HttpServletResponse) sr).setHeader("Cache-control", "private");In your case there are some other cache controls (including conflicting with the above) – probably the hosting application is configured to add them to each reply. Try to switch it off for PDF generating JSPs.
October 4, 2012 at 12:54#29125@PD4ML wrote:
It looks like the problem is caused by a caching of documents, downloaded by HTTPS. Please correct if I am wrong.
It was a known issue of older PD4ML JSP taglib versions, until we found a safe HTTP header directives set.Currently PD4ML taglib sets only the following HTTP cache control directives:
((HttpServletResponse) sr).setHeader("Pragma", "cache"); ((HttpServletResponse) sr).setHeader("Expires", "0"); ((HttpServletResponse) sr).setHeader("Cache-control", "private");In your case there are some other cache controls (including conflicting with the above) – probably the hosting application is configured to add them to each reply. Try to switch it off for PDF generating JSPs.
PD4ML, tankyou ! Works like a charm =)
I also have add cache-control: no-store, no-cache. See lines bellow:
response.setHeader("Pragma", "cache"); response.setHeader("Expires", "0"); response.setHeader("Cache-control", "private"); response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");Again, tankyou!
-
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.
