Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27054

    Hi,

    We are using PD4ML 3.9.2 library for converting HTML documents to PDF. We have a requirement to validate the CSS Styles in HTML document before converting the same to PDF.

    We have been using the CSSSOMParser (from cssparser 0.9.17 jar) earlier to validate the CSS present in the HTML content.

    But since PD4ML uses ss_css2 3.9.2 , we ended up replacing the existing CSS jar i.e cssparser 0.9.17 with the ss_css2 3.9.2 due to jar conflicts.

    The CSSSomParser in cssparser 0.9.17 provides a ErrorHandler that can be used to validate the CSS which is not available with CSSSomParser in ss_css2 3.9.2 library.

    Could you please let me know if there are any plans of upgrading ss_css2 to use the latest cssparser jar OR are there any workaround that we can achieve validation of CSS styles in HTML using PD4ML 3.9.2

    -Thanks

    #29845

    Hi,

    Any update on the above issue?

    -Thanks

    #29846

    I would recommend just to enclose your CSS style with HTML tags:

    [language=html:32yr1da5]


    [/language:32yr1da5]

    If it is a standalone CSS stylesheet, refer to it with tag from a minimalistic HTML as above.

    Pass the HTML to PD4ML in debug mode. PD4ML will dump to STDOUT all CSS syntax issues it detected.

    #29847

    [On behalf of sameera]

    Thanks for the reply. We are able to see the warning message for incorrect css stylings in DEBUG mode on the STDOUT.

    But, we are looking for means to get the validation errors as part of either exception or some means of handler callback so that we can capture and show it to the end user on UI. Please let me know if you have any suggestions or approaches to achieve the same.

    Thanks.

    #29848

    We could add the reporting only to the forthcoming v4.0 or PD4ML (not expected before October-November 2016).

    We do not plan to extend the current PD4ML v3.9.9 with new features. However we could add a prefix to all CSS diagnostics messages, so you’ll have a possibility to filter them from PD4ML’s output and show it to users if needed.

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

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