문제

Im still working with flying saucer to export xhtml to pdf.

At the moment its just a datatable with header and footer on every page.

The problem is, the header on the second page (and also on the following ones) has no margins, so the header underlays the content of the datatable, because the table is too large for one page.

Ive tried a lot, but nothing works.

The margins are set with css style in the body tag.

Hope somebody can help me as far.

Greetings

도움이 되었습니까?

해결책

Solved it to my own:

Just added

@page { margin: 100px 50px 50px}

to the styles.

The table had a very bad looking break after a page, so I added also this:

tr{page-break-inside:avoid;}

Now it works fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top