Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26897

    I am using command line tool to test pdf rendering, then I got the warning and error, but which line of the css caused the error? anyway to tell?

    C:utilpd4ml>pd4net “xyz.aspx?fkey=151711” 1024 -out t.pdf -debug
    version: PD4ML 385 Pro (eval)
    using content encoding from HTTP header: utf-8
    loading CSS file xxxxxxx/yyy.css
    Warning: Invalid syntax in CSS selector: “”
    Warning: Invalid syntax in CSS selector: “”
    processing xxxxxxx/yyy.css
    Object reference not set to an instance of an object.
    at org.w3c.css.sac.CSSParseException..ctor(String message, Locator locator)
    at com.steadystate.css.parser.SACParser.pseudo(Condition pred)
    at com.steadystate.css.parser.SACParser.simpleSelector(Selector sel, Char comb)
    at com.steadystate.css.parser.SACParser.selector()
    at com.steadystate.css.parser.SACParser.selectorList()
    at com.steadystate.css.parser.SACParser.styleRule()
    at com.steadystate.css.parser.SACParser.styleSheetRuleList()
    at com.steadystate.css.parser.SACParser.styleSheet()
    at com.steadystate.css.parser.SACParser.parseStyleSheet(InputSource source)
    at org.zefer.html.doc.css.CssParser.parseStyleSheet(InputSource source)
    at org.zefer.html.doc.css.CssRuntime.parseStyle(String css, Uri documentLocat
    ion, Boolean isCSSdoc)
    at org.zefer.html.doc.PD4MLHtmlParser.buildDocument()image size: 2005
    can not embed xxxxxxx/logo.png. Not emb
    eddable color type. Reformatting image…
    PNG marker: tEXt
    done in 16841684ms.

    #29457

    The exception is thrown by CSS Parser open source library (ss_css2.jar), which is very sensitive to CSS syntax errors and to not supported constructs. It seems in your CSS there is an unknown pseudo-selector.

    Since v398 PD4ML uses our proprietary CSS parser/cascading engine, developed to address issues like the one you reported.

    If an upgrade is not possible, try to narrow down the invalid CSS code location and fix it: comment out a half of the stylesheet – test for the exception; commend out a half of the remaining half – test; and so further.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.