HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › java.lang.NullPointerException – Not picking up CSS file
- This topic has 6 replies, 2 voices, and was last updated Oct 12, 2010
12:21:47 by PD4ML.
-
AuthorPosts
-
October 6, 2010 at 20:03#26463
I have installed the pd4ml_demo.jar and it renders my HTML page correctly.
However, the CSS file referenced as a link in the HEAD block does not seem to get applied. I get the following error:processing http://localhost:7070/BizFlowDemo/webapp/css/demo.css
java.lang.NullPointerException
at com.steadystate.css.parser.SelectorListImpl.toString(SelectorListImpl
.java:57)
at com.steadystate.css.parser.SACParser.selectorList(SACParser.java:1188
)
at com.steadystate.css.parser.SACParser.styleRule(SACParser.java:1083)
at com.steadystate.css.parser.SACParser.styleSheetRuleList(SACParser.jav
a:267)
at com.steadystate.css.parser.SACParser.styleSheet(SACParser.java:157)
at com.steadystate.css.parser.SACParser.parseStyleSheet(SACParser.java:5
8)
at org.zefer.html.doc.d.d.Ê00000(Unknown Source)
at org.zefer.html.doc.d.c.o00000(Unknown Source)
at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
at org.zefer.pd4ml.tools.PD4Browser.¶00000(Unknown Source)
at org.zefer.pd4ml.tools.PD4Browser$13.run(Unknown Source)
at org.zefer.pd4ml.tools.PD4Browser$11.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)I have tried various combinations of changing the link href.
I have used a file:/C:… as well as http://…..None seem to pick up the CSS.
Can you give me any pointers based on this error?
October 7, 2010 at 13:04#28232Obviously PD4ML successfully read the stylesheet, but CSS parser failed to interpret it. Could you please publish the stylesheet here or send it to support pd4ml com?
October 7, 2010 at 15:33#28233Thanks for the response. I have been investigating further and I figured out that it was passing the CSS.
I have cut down the CSS to just a couple of classes and it seemed to work.
Is there an easy way for me to debug which CSS makes it fail?I have spotted one, FILTER statement for IE.
Is there issues like browser specific styles used for progressive enhancements:
-webkit-box-shadow: 4px 4px 3px #888;
October 7, 2010 at 17:31#28234I have been going through trial and error and have resolved most issues of the CSS/HTML issues mentioned above.
Can you confirm if the following HTML will be supported:
1) FIELDSET & LEGEND
2) P (Paragraph)These are important HTML to us.
October 8, 2010 at 09:26October 8, 2010 at 09:27#28236Attached Document.
October 12, 2010 at 12:21#28237Here you are faced with restrictions of PD4ML.
1. PD4ML offers only a lightweight support of
. It understands only text in it and ignores nested tag structures if any. You may apply text style and color to the legend text (addressing
tag), but background colors and borders are going to be ignored.
2. PD4ML allows to apply styles to . But
tags are not a part of internal document structure tree, so they are not visible to CSS selector runtime. As a workaround you would need to remove .form from the CSS selectors.
[language=css:lhug3mi0].main_body .form P, .main_body .form DIV.customControl
{
font-weight : bold;
color: #004677;
line-height: normal;
margin: 0px !IMPORTANT;
padding: 1px 3px 1px 3px !IMPORTANT;
vertical-align: top;
}[/language:lhug3mi0] -
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.