Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: CSS of a HTML string rendering problem – Java
    #28127

    thanks for your replay.
    we bought the pd4ml pro library, but our problems are still there; even more, now with the licensed pd4ml.jar library the footer image isn’t rendered at all; footer is empty.

    more, i think there is a missunderstanding:
    i’m building the PDF document header and footer with a method like the following:

    private PD4PageMark getPageFooter(String cssTag)
    {
    String footerBody = "<html><head>" + cssTag + "</head>" +
    "<body><DIV id="footer"></DIV></body></html>";
    PD4PageMark footer = new PD4PageMark();
    footer.setAreaHeight( -1 ); // autocompute
    footer.setHtmlTemplate( footerBody );
    return footer;
    }

    then:
    …
    pd4ml.setPageFooter(this.getPageFooter(cssTag));

    So, i suppose i can’t use pd4ml tags when bulding header and footer like this. Isn’t it?

    So, i’ll get back and repost all of our problems that we are facing right now:
    1. header is rendered over the PDF document margins! (the header is built in exactly the same way as explained for the footer above)
    2. with the licensed library, the footer isn’t rendered at all!!! (footer is built as described above)
    3. header (and i suppose footer too) is rendered only for the first page of the resulted PDF document and not for all the other pages!!! I need the same header and footer in all the pages of the PDF document

    Sorry for pressing, but this problems are becoming urgent.
    Your help is very much appreciated.

    Stefan.

    in reply to: CSS of a HTML string rendering problem – Java
    #28125

    i’ve just sent to support a sample of PDF which has all the described problems in it.

    in reply to: CSS of a HTML string rendering problem – Java
    #28123

    i’ve made the change as you’ve suggested.

    the header works fine now and it is rendered the same as the HTML page header.
    the remaining problem is with the footer:
    like header, the footer is using a style that set an image for the background and width to 100%, but in the footer case, the image is rendered 1. up-side-down and 2. it is too big (left and right margins of the image are somewhere over the margins of the rendered pdf document); this 2nd. issue is also applyed for the case of the header, even if it is not so visible.

    for the html document i’m using
    pd4ml.adjustHtmlWidth();
    to be able to fit the html text into the pdf document and this is working.

    how can i do the same for footer?

    private PD4PageMark getPageFooter(String cssTag)
    {
    String footerBody = "<html><head>" + cssTag + "</head>" +
    "<body><DIV id="footer"></DIV></body></html>";
    PD4PageMark footer = new PD4PageMark();
    footer.setAreaHeight( -1 ); // autocompute
    footer.setHtmlTemplate( footerBody );
    return footer;
    }

    thank you for your help.

    one more problem: after i’ve set the page header and footer with pd4ml.setPageHeader and pd4ml.setPageFooter, the header and footer appears only on the first page of the rendered PDF. I don’t understand why header and footer aren’t rendered for all of the pages! How can i make it work?

    in reply to: CSS of a HTML string rendering problem – Java
    #28122

    thanks for the response. i’ve resolved that problem.

    no, i want to add a header and footer to the rendered pdf doc.
    for this i’ dooing the following:

    private PD4PageMark getPageHeader(String htmlString)
    {
    String headerBody = "<DIV id="header"></DIV>";
    PD4PageMark header = new PD4PageMark();
    header.setAreaHeight( -1 ); // autocompute
    header.setHtmlTemplate( headerBody );
    return header;
    }

    In my html document, in the CSS file i have a stule class which difines the “header” with a background image.
    How can i use the same CSS file when adding a header to the pd4ml object?

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