Viewing 1 post (of 1 total)
  • Author
    Posts
  • #26176

    You may dynamically add the data (for example the current date) to the header/footer definition teamplate:

    Java:

    String pageNumberTemplate = getFormattedDate() + ", page $[page]";
    footer.setPageNumberTemplate( pageNumberTemplate );

    JSP:

    <%
    String template = getFormattedDate() + ", page $[page] ";
    %>
    
    <pd4ml:footer
    pageNumberTemplate="<%=template%>"
    titleAlignment="left"
    pageNumberAlignment="right"
    color="#008000"
    initialPageNumber="1"
    pagesToSkip="1"
    fontSize="14"
    areaHeight="18"/>

    The actual versions also allow to substitute placeholders like $[var] in headers/footers or in the document body with the API call:

    Map m = new HashMap();
    m.put("var", "value");
    m.put("date",   getFormattedDate() ); // to replace $[date]
    htmlConverter.setDynamicParams(m);

Viewing 1 post (of 1 total)

The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.