Dita PDF/CSS: header/footer box size

Post here questions and problems related to editing and publishing DITA content.
Posts: 35
Joined: Wed May 25, 2016 10:45 am

Dita PDF/CSS: header/footer box size

Post by abacus66 »

HI there!
Is it possible to change the size of the header/footer boxes (top-left...)? In the documentation it is said:
Using a top-center box together with a top-left or top-right will create a sequence of three areas of identical width, with the top-center box occupying the center.
Is it firmly?
Best regards,
Dr. ABacus

#define QUESTION ((bb) || !(bb)) // © 1601 William Shakespeare
Posts: 470
Joined: Thu May 02, 2019 2:32 pm

Re: Dita PDF/CSS: header/footer box size

Post by chrispitude »

Hello Dr. ABacus,

I did not know the answer to this question, so I created a testcase to experiment with it:

(2.89 KiB) Downloaded 3 times

The "My PDF Transformation" transformation defined in the project applies the following CSS:

Code: Select all

@page {
  @bottom-left {
    content: 'bottom-left';
    width: 1in;
    background-color: pink;
  @bottom-center {
    content: 'bottom-center';
    width: 2in;
    background-color: yellow;
  @bottom-right {
    content: 'bottom-right';
    width: 3in;
    background-color: lightblue;
Here is what I found:
  • The "width" CSS property is always ignored for headers/footers.
  • When only left/right are defined, the widths auto-size to the content.
  • When left/center/right are defined, the widths are equal, regardless of how much/little content is in each box.
The documentation you cited appears to be accurate and complete. I could not find a way to adjust the width beyond what is documented.

By the way, note that there is a dedicated PDF Chemistry section of this message board here:

Board index > Oxygen PDF Chemistry > Common Problems (common-problems-f26/)
Posts: 257
Joined: Wed Oct 16, 2019 3:47 pm

Re: Dita PDF/CSS: header/footer box size

Post by julien_lacour »

Hello Dr. ABacus,

As Chris mentioned it is currently not possible to set custom width for page-margin boxes, instead you can use a custom SVG image as explained in this thread: viewtopic.php?f=20&t=21939

I also added your vote to the related feature request.

Post Reply