PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ Can I create multipe line/row header or footer?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26309

    I am trying to create a 2-line footer, and was just wondering if it’s possible, and if anyone had done it?
    Thanks!

    example:
    footer1

    footer2

    #27752

    I guess you mean non-HTML, non-inline headers.

    In the case you may define title- or page-number-template with “n” as line break character (in some contexts you would probably need to add an extra backslash: “\n”).

    And do not forget to allocate a sufficient space for the multiline header with areaHeight property.

    #27753

    it’s java.
    footer.setAreaHeight( 15 );
    footer.setFont(new java.awt.Font(“Arial”, java.awt.Font.PLAIN, 7));
    footer.setColor( java.awt.Color.black );
    footer.setPagesToSkip( 0 );
    footer.setTitleTemplate( Title );
    footer.setPageNumberTemplate( “277GG11-06” );
    footer.setTitleAlignment( org.zefer.pd4ml.PD4PageMark.LEFT_ALIGN );
    footer.setPageNumberAlignment(org.zefer.pd4ml.PD4PageMark.RIGHT_ALIGN);
    pd4ml.setPageFooter( footer );
    There is a footer called Title, and I need to add another footer above it.
    Thanks!

    #27754

    There is no way to define more than one footer with pd4ml.setPageFooter()

    I would workaround that way:


    footer.setAreaHeight( 30 );
    footer.setTitleTemplate( “upper footer textn” + Title );
    footer.setPageNumberTemplate( “n277GG11-06″ );

    Also PD4ML Pro allows you to define an inline footer, which will co-exist with your current footer.

    #27755

    Is this still intended to work? The code below does not result in newlines being entered into the footer.

    #27756

    @jf wrote:

    Is this still intended to work? The code below does not result in newlines being entered into the footer.

    Sorry, I forgot to submit the code:

    PD4PageMark footer = new PD4PageMark();<br /> footer.setAreaHeight(100);<br /> footer.setTitleTemplate( "upper footer textn" + "TEST" );<br /> footer.setPageNumberTemplate( "n277GG11-06" );<br /> pd4ml.setPageFooter(footer);

    The rendered PDF displays a single line: “upper footer text TEST”

    Using the pro version.

    #27757

    The best way would be to define header/footer in HTML, i.e.:

    [language=java:g3o09eri]header.setHtmlTemplate(“page $[page] of $[total]
    second line”);[/language:g3o09eri]

    However in text-only headers/footers ‘n’ character should break a line.

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

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