Viewing 15 posts - 1 through 15 (of 33 total)
  • Author
  • #26201

    PD4ML provides 3 types of headers/footers.

    1. text-only
    2. html (PD4ML Pro)
    3. inline (PD4ML Pro)

    The first 2 options are available by PD4ML Java API calls (or as JSP custom tags mapped to PD4ML API): i.e.
    -> pd4ml.setPageFooter();

    1. Text only (in such form can be used only in JSP):
    Java version:
    [language=java:lsk60rtn]PD4PageMark footer = new PD4PageMark();
    footer.setPageNumberTemplate(“page $[page] of $[total]”);
    footer.setColor(new Color(0x008000));

    2. HTML formatted footer (in such form can be used only in JSP)

    [language=xml:lsk60rtn] page $[page] of $[total] [/language:lsk60rtn]
    Java version:
    [language=java:lsk60rtn]PD4PageMark footer = new PD4PageMark();
    footer.setHtmlTemplate(“page $[page] of $[total]“);

    areaHeight=”-1″ means “autocompute” there

    3. The third option, inline footer, allows to define footer body in HTML/PHP document:

    [language=xml:lsk60rtn] footer: $[page] of $[total] [/language:lsk60rtn]

    The definition impacts all subsequent pages after the page, where the footer defined. A new appearance of the footer overrides previously defined one.
    In order to define the footer for the first page, you need to place the definition immediately after tag or before .

    Also you may explicitly define pages, where the footer needs to be applied:

    [language=xml:lsk60rtn] first page footer: $[page] of $[total]
    footer: $[page] of $[total]

    The above defines different footers for the first page and for the rest of the pages (the second and others). Also “scope” understands “even”, “odd” and “skiplast” modifiers. Example:



    I’m evaluating your product to use in production at a customer site.
    I tried to add headers and footers to pages with these definitions:


    The header appears but the footer does not.
    I’m using the latest version of the library (3.5.1). I already checked the images and verified they are correct.
    Can you help me?


    First, try to make sure that it tries to render the footer: add border=”1″ to footer’s

    and ispect if the borders are in the PDF output.


    I tried adding border=”1″ to the table element. The footer does not print. What else can I do?


    How many pages has the resulting PDF document?
    Does it print the footer on the second page?


    The document has tree pages. The header prints on every page correctly while the footer never prints.
    Just in case, I can send you an example generated PDF and the HTML used.


    yes, please send it to support (at) pd4ml . com


    Did you find the solution for footer issue mentioned?I am also facing the same problem.


    Please send the HTML source, Java code snippet (if any) and its resulting PDF to support pd4ml com.


    I’m trying to insert a footer for only page 1.

    Via API-call this can’t be done, accordering to the reference.

    So, only inline is the only option I see.

    This is my code:


    This part seems to be just ignorred. (page.header does work this way).

    Is this a bug, or am I doing something wrong?


    replace areaHeight=”100″ with height=”100″ – it should help if you use PD4ML Pro (not Std)


    Thanks for you quick reply, this solution worked!


    I’m trying to put header and footer put through java, how can I do this?


    With PD4ML Pro it can be done like that:

    [language=java:wlo7a5r4]PD4PageMark footer = new PD4PageMark();
    footer.setHtmlTemplate(“page $[page] of $[total]“);

    Use pd4ml.setPageHeader() for headers.


    Hi Folks,

    when I already tried this, but it no works.
    When I put footer and header, only header appears.

    Thanks in advance.

Viewing 15 posts - 1 through 15 (of 33 total)

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