用css来控制打印的pdf样式

@page { 

 size: A4 landscape;

 margin-left:10px;

 margin-right:10px; 

 margin-top:37px;

 margin-bottom:20px;

 @top-center { content: element(header) };

 @bottom-center { content: element(footer) } ;

}

 

.header {

 position: running(header);

 text-align:left;

}

.footer {

 position: running(footer);

 font-size: 90%;

 text-align:center;

}

.content{}

#pagenumber:before {

 content: counter(page); 

}

#pagecount:before {

 content: counter(pages);  

}

 

html里的写法:

Component Associations Report

 

 

 

拓展阅读:http://blog.csdn.net/shanliangliuxing/article/details/6833471

你可能感兴趣的:(HTML,报表,xhtml)