Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27056

    I am new to pd4ml and trying evaluation version, I try to use pd4ml java library

    Code Snippet:

    pd4ml.useTTF("java:fonts", true);
    pd4ml.enableDebugInfo();
    pd4ml.setHtmlWidth(1000);
    java.io.FileOutputStream fos = new java.io.FileOutputStream("c:/test123.pdf");
    pd4ml.render("http://stage01:8080/",fos);

    in the debug info i am getting

    version: PD4ML 398fx3 (eval)
    default built-in stylesheet parsed [19ms]
    loading http://stage02:8080/pm/#/login [636ms]
    using content encoding from HTTP header: UTF-8
    loading CSS file for http://stage02:8080/pm/css/ppm-lib.min.css
    not yet in cache: http://stage02:8080/pm/css/ppm-lib.min.css
    loading http://stage02:8080/pm/css/ppm-lib.min.css [1060ms]
    stylesheet 'http://stage02:8080/pm/css/ppm-lib.min.css' parsed [129ms]
    CSS parsing errors (http://stage02:8080/pm/css/ppm-lib.min.css)
    line 5: unknown or misused CSS function: format [<line too long to dump>]
    line 5: unexpected character ',' [<line too long to dump>]
    
    css parsing issues unexpected character ',' [<line too long to dump>]
    ..........

    #29852

    Help me in finding the cause of the css parsing issue.

    #29850

    1. Try to reformat the single-line CSS stylesheet into more readable content with a formatter tool. I googled http://www.cleancss.com/css-beautify/ – and it works fine.

    2. Run PD4ML with debug switched on. Now it reports CSS errors with a reference to particular string number of the stylesheet.

    2. Locate and comment unsupported directives out or fix syntax errors.

    In the most recent version (v398fx4) we suppressed a lot of warning messages, caused by unimplemented popular media control functions (which are usually irrelevant by PDF generation). So check out the version – it produces less warnings on your HTML/CSS.

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

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