Page 1 of 1

Page numbering in bookmap PDF transformation

Posted: Fri Feb 18, 2022 5:38 pm
by AudreyChr
I usually use a DITA map and have no problem with page numbering.

I attempted to create a bookmap so I could add front and back matter but I've run into trouble with the page numbering which is stubbornly in roman-lower format. The exception is one topic (included in the front matter) which has decimal numbering.

How do I change this?

Re: Page numbering in bookmap PDF transformation

Posted: Fri Feb 18, 2022 7:26 pm
by julien_lacour
Hello,

In order to see how the CSS is applied on your DITA files, you can try to debug your CSS.

The roman numbering came from the default stylesheet located in [DITA-OT_DIR]plugins/com.oxygenxml.pdf.css/css/print/p-pages-and-headers.css.

You can simply override it by using the following rules in a separate CSS stylesheet:

Code: Select all

@page table-of-contents:left {
  @top-left {
    content: string(toc-header) " | " counter(page);
  }
}
@page table-of-contents:right {
  @top-right {
    content: string(toc-header) " | " counter(page);
  }
}

@page matter-page:left {
  @top-left {
    content: counter(page);
  }
}

@page matter-page:right {
  @top-right {
    content: counter(page);
  }
}
If you have problems using a custom CSS stylesheet, you can follow the instructions from this topic.

Regards,
Julien