DITA to PDF output - Alternate Header

Pandounours
Posts: 9
Joined: Tue Jun 29, 2021 2:27 pm

DITA to PDF output - Alternate Header

Post by Pandounours » Mon Jul 19, 2021 1:40 pm

I read the documentation here: https://www.oxygenxml.com/doc/versions/ ... s_css.html

Default Page

The default page imposes a header that contains the publication title, chapter, and section title. They alternate on the left or right side of the page:

How do I get the header to stay in the same position?

Someone has a solution to have a background on the header and footer ?

julien_lacour
Posts: 203
Joined: Wed Oct 16, 2019 3:47 pm

Re: DITA to PDF output - Alternate Header

Post by julien_lacour » Mon Jul 19, 2021 2:39 pm

Hello,

You will find more information in our user-guide together with some How-To topics.
https://www.oxygenxml.com/doc/versions/ ... nd_footers

You can also check the topic about How To Debug the CSS.

If you want both left and right headers to be the same, you can check and keep the rule that interests you (for example the right footer) and set it for the left footer using the :left pseudo-class. Also make sure your new rule override the default left rule by setting for example display: none on unnecessary page margin boxes.

Regards,
Julien

Pandounours
Posts: 9
Joined: Tue Jun 29, 2021 2:27 pm

Re: DITA to PDF output - Alternate Header

Post by Pandounours » Mon Jul 19, 2021 10:18 pm

Thanks, it work well. And for background color ? Any idea ?

julien_lacour
Posts: 203
Joined: Wed Oct 16, 2019 3:47 pm

Re: DITA to PDF output - Alternate Header

Post by julien_lacour » Tue Jul 20, 2021 9:50 am

Hello,

For this you also need to use the page margin boxes, like this:

Code: Select all

@page {
  @top-left {
    background-color: red;
  }
}
If the color does not appear, it means that the content of the page margin box is empty, you can correct that by adding

Code: Select all

content: "";
In the CSS rule (for the corners for example).

Regards,
Julien

Post Reply