CSS-Based PDF - Creating solid color headers

Posts: 78

CSS-Based PDF - Creating solid color headers

Fri Nov 09, 2018 11:43 pm

I'm using the @page element (via @top-left, @top-right, @top-left-corner, @top-right-corner) with a gray background color to create a solid header the spans the width of the page.

However, in order to get it to cover the whole width of the page, I have to the @page margin-left and margin-right to be 0.0in. Whenever I change the margins (for example, to 0.2in), the header no longer goes all the way across the page - it results in gaps on the sides, equal to the size of the margin.

Any tips on this?
Posts: 325

Re: CSS-Based PDF - Creating solid color headers

Mon Nov 12, 2018 11:12 am

If you set the margins of a page size to zero, the page margin boxes from that side will not be visible.
In general, if you want to style the header of the page, we recommend using a background image set on the entire page, as explained here:

https://www.oxygenxml.com/doc/versions/ ... und_images

If you are using Chemistry from DITA-OT, please read:

https://www.oxygenxml.com/doc/versions/ ... aid-title6

Let us know if you need more information.

Many regards,

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest