Page 1 of 1
Dita PDF/CSS: header/footer box size
Posted: Sat May 21, 2022 10:17 am
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?
Re: Dita PDF/CSS: header/footer box size
Posted: Sun May 22, 2022 5:15 pm
by chrispitude
Hello Dr. ABacus,
I did not know the answer to this question, so I created a testcase to experiment with it:
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/)
Re: Dita PDF/CSS: header/footer box size
Posted: Tue May 24, 2022 10:59 am
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.
Regards,
Julien