Custom footer content

Post here questions and problems related to editing and publishing DITA content.
gyinshuen
Posts: 6
Joined: Tue Sep 09, 2025 11:17 am

Custom footer content

Post by gyinshuen »

Hi,

I would like to customize the footer as Image 1 using CSS for PDF output. Here's my CSS code, but it seems to be all the info goes into center (Image 2)

Code: Select all

@bottom-left-corner {
		content:oxy_xpath('(//*[contains(@class, "bookmap/bookpartno")]/text())[1]') "-" oxy_xpath('(//*[contains(@class, "bookmap/revisionid")]/text())[1]');
		font-family: 'Calibri', sans-serif;
		font-size: 9pt;
		color: silver;
		padding-bottom: 20pt;
		vertical-align: bottom;
	}
	
	@bottom-center {
		content: "© " oxy_xpath('(//*[contains(@class, "bookmap/year")]/text())[1]') " Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal. \A All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.";
		font-size: 0.5em;
		color: silver;
		padding-bottom: 40pt;
		vertical-align: bottom;
	}
	
	@bottom-right-corner {
		content: counter(page);
		font-family: 'Calibri', sans-serif;
		font-size: 9pt;
		color: silver;
		padding-bottom: 20pt;
	}
.
image.png
image.png
You do not have the required permissions to view the files attached to this post.
julien_lacour
Posts: 723
Joined: Wed Oct 16, 2019 3:47 pm

Re: Custom footer content

Post by julien_lacour »

Hello,

Could you indicate which version of Oxygen you are using?
With the CSS fragment from your post I did get the correct output:
image.png
Usually this happens when @bottom-left and @bottom-right page margin boxes are defined (even if their content is empty, the processor still creates them).

Regards,
Julien
You do not have the required permissions to view the files attached to this post.
gyinshuen
Posts: 6
Joined: Tue Sep 09, 2025 11:17 am

Re: Custom footer content

Post by gyinshuen »

Hi Julien,
Pardon, the code I provide is with output you provided indeed. But one more question, can I make the second row and the third row in one line? just like the sample I provided.
julien_lacour
Posts: 723
Joined: Wed Oct 16, 2019 3:47 pm

Re: Custom footer content

Post by julien_lacour »

Hello,

If you add background-color, to @bottom-center you can see the second sentence doesn't fit on a single line:
image.png
However you can either reduce the font-size or the page left/right margin and the extra line break will disappear, for example:

Code: Select all

  /* top | right | bottom | left */
  margin: 1in 0.5in 1in 1in;
But you have to keep in mind this margin will apply to the whole document.

Regards,
Julien
You do not have the required permissions to view the files attached to this post.
Post Reply