Forum How do I...?

Image in header/footer

brendanh
Is there a way to include an image in the header / footer?

Here are two ways I have attempted, but no success:

@page { 
	@bottom-left {
		background-image: url(/path/to/image.jpg);
	}



@page { 
	@bottom-left {
		content: '<img src="/path/to/image.jpg" alt="Alt description">';
	}


I'm using PrinceXML 8.1 on Centos 5.6.
mikeday
Try "content: url(...)". The background-image will also work, but only if the margin box also has some text content, otherwise the box will be considered empty and the background will not display.
brendanh
That did the trick, thanks!
Horba
@bottom {content: url(http://localhost/rodifoot.jpg);}


In addition to this solution is there a way to force the image to the available size in the footer?
mikeday
The image will appear at its normal size, if you want something different you will need to use the flow property to move a scaled img element to the footer.
Horba
mikeday wrote:
The image will appear at its normal size, if you want something different you will need to use the flow property to move a scaled img element to the footer.


Thought as much. Thank you!