Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26968

    We are using PD4ML to convert an HTML to PDF and it is client facing. Recently we are facing an issue in some browser. The PDF is not being generated. The issue has been fixed when we clear the cache or added trusted sites or enable adobe reader.

    The pattern of the issue is not same in all cases in all browser. As we are using this in client facing we can not ask each client to change their browser setting.

    Any suggestions would be great.

    #29607

    There is a big probability the issue is caused by cache control directives (or a missing of them) in HTTP header you sent with PDF documents.

    PD4ML JSP taglib sends HTTP headers as below. Try the same on your side.

    [language=java:3koaqin3]sr.setContentType(“application/pdf”);
    String disposition = (inline ? “inline” : “attachment”) + “; filename=” + fileName;
    ((HttpServletResponse) sr).setHeader(“Content-disposition”, disposition);
    ((HttpServletResponse) sr).setHeader(“Pragma”, “cache”);
    ((HttpServletResponse) sr).setHeader(“Expires”, “0”);
    ((HttpServletResponse) sr).setHeader(“Cache-control”, “private”);[/language:3koaqin3]

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.