Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #26312

    Hi !
    I use PD4ML with pd4ml.render(URL[] , OutputStream). Server is Tomcat.

    I have two issues:

    1- PD4ML ignore the JSTL library fmt.
    seems to be ignored. So my numeric datas aren’t formatted.
    How can I formatting datas ?

    2- I’ve a lot of different JSP, so I don’t want to create JSP especialy for PDF.
    Some parts of JSP are only usefull for screen: buttons, navigation toolbar, etc …..
    Is it possible to add a pd4ml tag in JSP to avoid the rendering of a piece of jsp/html code ?



    1. PD4ML does not implement JSP container functionality, so any custom tags or JSP code is ignored. If you need to convert a JSP page, you should let Tomcat to process it before it is passed to PD4ML. For example:

    pd4ml.render( “”, os );

    assuming that” returns HTML document with already resolved/interpreted.

    Another option is to enclose source.jsp content within and tags. (see

    2. CSS properties “pd4ml-visibility: hidden; pd4ml-display: none” should help.


    thanks a lot for your response.

    I don’t understand very well your response for my issue #1:

    I’ve to compute in a sigle pdf doc severals jsp pages. What’s why I use the pd4ml.render(URL[], OutputStram) syntax. Moreover those jsp can by used in a “screen” mode so I can’t use the tag

    My array of URL is:

    where struts_action is the name of an action in my struts-config.xml file and ctx the name of my web app

    I can’t address directly the JSP, I’ve to invoke a struts action before.

    So I thought Tomcat will interpret jstl tag before giving the result to pd4ml.
    Do you have an idea why it is not the case ?



    So is interpreted (and does not appear in the HTML, passed to PD4ML), but the resulting numeric data format is invalid?

    Does depend on Locale settings of user session? If so, you need to propagate the session ID with https://my_server/ctx/ and other URLs.

    Here is some info how to do that:


    Hi !
    Thanks for your response.

    It’s exactly that: is interpreted (and does not appear in the HTML, passed to PD4ML), but the resulting numeric data format is invalid.

    You were right ! It was a problem about the Locale.

    But I can’t understand why. Sessions are correctly propagated. I’m sure of this since I use them in my struts action. I use pd4Ml.setSessionId(), I put explicitly the sessionid in the url, I use pd4ml.setCookie("JSESSIONID", sessionId) but nothing works, numeric datas aren’t formatted !

    Finally, I ‘ve added the definition of locale directly in my JSP:
    <fmt:setLocale value="FR_fr"/> and now it works fine !!!

    I don’t understand why I need to do that since Sessions are correctly propagated ….
    Anyway, It works fine now.

    Thank you very much for your help.
    Best Regards,


    cookie format requires path information, so the value should look like “9034657927465;path=/”

    pd4ml.setSessionID() does not add session ID to the original document URL, but to referenced resource URLs only (images, CSS).

    You need to add the session ID to the document URL manually:;jsessionid=9034657927465?other=params&if=any

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

The forum ‘Troubleshooting’ is closed to new topics and replies.