Hi
I am fairly new to html/css and just trying to use prince to generate a paged html report. I've got it working but I have got a couple of queries.
The report is made up of a cover, toc and report sections.
I am adding a header to each page of the report where there is not already a section name. The start of each section is set by a div class called "page" and includes the section name. The header name is obtained by getting a string of the current section name.
In order to achieve this I am having to use prince-page-group: start in order to not show the header at the start of each page section. Is there a pure CSS standard implementation of this? I ask as I would like the print style sheet to be multi-program as the html report is sent to a third party who also converts the html to pdf but using the itext library.
When using prince I am using the inline style sheet within the HTML and using prince to import a separate prince style sheet for pagination. Within the inline style sheet I am using h6{page-break-before: always} and in the pagination style sheet h6{page-break-after: always}. The inline style sheet seems to have priority over the imported one. Is there a way to solve this? I have looked here princexml.com/doc/9.0/apply-css/ but couldnt find the answer.
Prince CSS:
I am fairly new to html/css and just trying to use prince to generate a paged html report. I've got it working but I have got a couple of queries.
The report is made up of a cover, toc and report sections.
I am adding a header to each page of the report where there is not already a section name. The start of each section is set by a div class called "page" and includes the section name. The header name is obtained by getting a string of the current section name.
In order to achieve this I am having to use prince-page-group: start in order to not show the header at the start of each page section. Is there a pure CSS standard implementation of this? I ask as I would like the print style sheet to be multi-program as the html report is sent to a third party who also converts the html to pdf but using the itext library.
When using prince I am using the inline style sheet within the HTML and using prince to import a separate prince style sheet for pagination. Within the inline style sheet I am using h6{page-break-before: always} and in the pagination style sheet h6{page-break-after: always}. The inline style sheet seems to have priority over the imported one. Is there a way to solve this? I have looked here princexml.com/doc/9.0/apply-css/ but couldnt find the answer.
Prince CSS:
@page{
size: A4;
margin: 10mm 14mm 15mm 25mm;
padding-top: 5mm;
font-family: Arial, Helvetica, Veranda;
font-size: 9.5pt;
@bottom-center {
content: "Page " counter(page);
}
@top-right {
content: string(header) " CONTINUED";
margin-top: 5mm;
border-bottom: 1px solid #000;
font-weight: bold;
}
}
@page page:first {
padding-top: 2mm;
@top-right {
content: none;
}
}
@page cover {
@top-right {
content: none;
}
@bottom-center {
content: none;
}
}
@page toc {
@top-right {
content: none;
}
@bottom-center {
content: none;
}
}
.page {
page: page;
prince-page-group: start
}
.cover {
page: cover;
}
.toc {
page: toc;
}
div.toc p a:after {
content: leader("...") target-counter(attr(href, url), page);
}
div.toc {counter-reset: page 1}
p.title {string-set: header content()}
h6{page-break-after: always}