Page 1 of 1

Custom footer content

Posted: Thu Oct 23, 2025 8:33 am
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

Re: Custom footer content

Posted: Thu Oct 23, 2025 9:44 am
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

Re: Custom footer content

Posted: Thu Oct 23, 2025 9:50 am
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.

Re: Custom footer content

Posted: Thu Oct 23, 2025 10:08 am
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