Details about changing the rendering of the PDF are documented here:

 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel

In your case to change the background color the easiest solution is probably to 
attach a file named "pdf.css" to the page XWiki.DefaultSkin
with the contents:

.box {
  background-color: #CCCCCC;
}

or whatever color you would like to have in print.

I have to admit that I could not get a border around the box with a similar CSS 
declaration;
also I could not fix the indentation of the text around the block; actually it 
should not be indented ...

Adding a separate

p {
  text-indent:0;
}

to the pdf.css fixes that, but I am not sure if this does not has other side 
effects

hope it helps anyway
Clemens

> Hi,
> 
> i use the macro "code" to highlight code blocks in the text. On export (e.g. 
> as pdf) only the text is colored and has another font, but there is no border 
> or background color, like in the web view. The text before and after the code 
> block is also not quite nice styled. It is indented wich is not good for 
> reading.
> 
> How can i change the style of the code blok and surrounding text in the 
> exported document?
> 
> With best regards
> Alina
> 
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to