Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27141

    I am facing this issue, where i have a servlet to which i pass html content and try to convert it in PDF, content of page gets converted into PDF, but while rendering page is not using any CSS files, to debug i enabled debug mode and i get

    csstest.css (The system cannot find the path specified): file:css/test.css (socket timeout 0ms)

    After looking at forums, i came across useServletContext and useHttpRequest, tried using both, still same issue.

    Below are the complete logs.
    version: PD4ML 3101 Pro DMS
    loading CSS file for file:css/test1.css
    not yet in cache: file:css/test1.css
    loading file:css/test1.css [1ms]
    csstest1.css (The system cannot find the path specified): file:css/test1.css (socket timeout 0ms)
    can not read file:css/test1.css
    loading CSS file for file:css/test2.css
    not yet in cache: file:css/test2.css
    loading file:css/test2.css [0ms]
    csstest2.css (The system cannot find the path specified): file:css/test2.css (socket timeout 0ms)
    can not read file:css/test2.css
    loading CSS file for file:css/test3.css
    not yet in cache: file:css/test3.css
    loading file:css/test3.css [0ms]
    csstest3.css (The system cannot find the path specified): file:css/test3.css (socket timeout 0ms)
    can not read file:css/test3.css
    loading CSS file for file:css/test4.css
    not yet in cache: file:css/test4.css
    loading file:css/test4.css [1ms]
    csstest4.css (The system cannot find the path specified): file:css/test4.css (socket timeout 0ms)
    can not read file:css/test4.css
    image not yet in cache: file:images/pCaller.png
    not yet in cache: file:images/pCaller.png
    loading file:images/pCaller.png [0ms]
    imagespCaller.png (The system cannot find the path specified): file:images/pCaller.png (socket timeout 0ms)
    image file:images/pCaller.png has zero length.
    can not load image: images/pCaller.png
    done in 1001ms.
    resulting PDF size: 32157 bytes

    #30024

    Fixed above issue, but i am stuck on another one, another something i read in multiple threads, but not sure whether its supported or not, i have an HTML which has a main header, and then table header i want to repeat both of them on page breaks, below is what i am trying to do.

    Header 1
    Table Header Table Header Table Header Table Header Table Header Table Header Table Header

    26

    My Content

    27

    My Content

    28

    My Content

    1

    My Content

    2

    My Content

    3

    My Content

    4

    My Content

    in above example i know that pd4ml doesn’t supports thead, what i am doing is breaking the html on the basis of thead, tbody and tfooter, and using it to set below api’s

    pd4ml.setPageHeader
    pd4ml.render
    pd4ml.setPageFooter

    What happens is, it only displays Header 1, Table header’s are never displayed, if i remove Header 1, Table Header’s are displayed, but i want both of them to be displayed in each page.

    #30025

    Never mind fixed above as well, posting it for someone who is faces same issues
    1. css not getting rendered :- in my cases i had to add an extra / before css path, it started taking relative path.
    2. header getting cut off :- i had to use pd4PageMark.setAreaHeight, this fixed issue for me.

    my next step is to move whole thing from servlet to rest service, lets see how it goes.

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

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