[英]need xhtml2pdf (Pisa 3.0) css syntax for @page and @frame
i'm trying stuff out with xhtml2pdf (aka Pisa 3.0) and django and am having trouble with the css 我正在尝试使用xhtml2pdf(又名Pisa 3.0)和django并且遇到麻烦
http://www.xhtml2pdf.com/doc/pisa-en.html http://www.xhtml2pdf.com/doc/pisa-en.html
obviously the docs above talk about the css that is available as well as vendor specific tags. 很明显,上面的文档讨论了可用的css以及供应商特定的标签。
If i follow the example in the docs for static frames and make css like 如果我按照静态帧的文档中的示例,并使CSS像
@page{
margin:0cm;
@frame header{
-pdf-frame-content: header;
height: 3cm;
}
@frame footer{
-pdf-frame-content: footer;
bottom: 2cm;
height: 2cm;
}
}
.main_content{
padding: 0px
}
#header{
background-color: #02164c;
font: #FFFFFF;
width:100%;
}
#footer{
width: 100%;
}
.pageBreak{
page-break-after: always;
}
I get an error in django 我在django中收到错误
Exception Value: 例外价值:
Ruleset opening '{' not found:: (u'@page{\\n\\t\\tmargin:', u'0cm;\\n\\t\\t@frame header')
规则集打开'{'not found ::(u'@ page {\\ n \\ t \\ t \\ ttrigin:',u'0cm; \\ n \\ t \\ t \\ t @ frame header')
Exception Location: /usr/lib/pymodules/python2.6/sx/w3c/cssParser.py in _parseAtPage, line 654
异常位置:/usr/lib/pymodules/python2.6/sx/w3c/cssParser.py in _parseAtPage,第654行
it looks like the css parser is croaking on @page. 它看起来像是@ss上的css解析器。
To me it looks like i'm using it as in the examples. 对我而言,我看起来就像在示例中一样使用它。 I'm hoping someone can help provide some guidance on this or point me to some template examples.
我希望有人可以帮助提供一些指导,或者指出一些模板示例。
I also am wondering how to use the -pdf- vendor specific tags. 我也想知道如何使用-pdf-供应商特定标签。 there is no documentation on these tags that i can find...
我找不到这些标签的文档......
@page{
似乎在{
更改为@page {
之前没有空格时导致错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.