开发者

a question on using xhtml2pdf to parse css from website

I am trying to use xhtml2pdf to convert a webpage to pdf. After reading out the content of the webpage using urllib2, I found pisa.CreatePDF needs to process every link in the webpage content too. Especially, whenever it tried to parse .css file after I tried several websites, I got the following error:

pisa-3.0.33-py2.6.egg/sx/w3c/cssParser.py", line 1020, in _parseExpressionTerm
sx.w3c.cssParser.CSSParseError: Te开发者_JAVA百科rminal function expression expected closing ')':: (u'Alpha(Opacity', u'=0); }\n\n\n\n.ui-state-')

Do you seem this issue too? Could anyone please help? Thanks a lot.


pisa-3.0.33-py2.6.egg/sx/w3c/cssParser.py", line 1020, in _parseExpressionTerm sx.w3c.cssParser.CSSParseError: Terminal function expression expected closing ')':: (u'Alpha(Opacity', u'=0); }\n\n\n\n.ui-state-')

I think it was because it didn't recognize your css, which is alpha(opacity bla.. bla

I was having that problem before because of my javascript, I removed them and now it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜