tfoot overlapping with Headers in PhantomPDF



  • Hi,

    i have tried a lot to avoid tfoot overlapping with the header, but i could not able to success in it. please help me on this. i am getting number of complaint on this. please check this below link for overlapping issue.

    https://playground.jsreport.net/studio/workspace/r19O36oZ-/20

    looking forward to get positive response.



  • I just gave it quick look, would this be better?

    https://playground.jsreport.net/studio/workspace/r19O36oZ-/22

    If not, I recommend you to remove styles step by step to find out which one is causing the issues.
    Some links to workarounds are here
    https://github.com/jsreport/jsreport/issues/297#issuecomment-304932638



  • Thanks for looking this in quick time.
    since the data is dynamic, we have to avoid this header overlapping. i tried a lot but no luck in it.



  • Maybe you've missed I commented out the width in this style and the result is not overlapped after

    .allocationdata{
            /*width:180%;*/
            margin-top:15px;
            padding-left:5px;
        }
    


  • the issue still exist, u can check this below the 'Grand Total' is getting overlapping in second page header

    https://playground.jsreport.net/studio/workspace/r19O36oZ-/24



  • I don't see it overlapping there....

    In every case, try the links I mentioned, change styles, search phantomjs issue.
    This is not something we can fix since it is phantomjs/webkit problem.
    You can also take a look on the electron-pdf recipe, it may work better for you.



  • thank you very much, it look like electron-pdf recipe is not having this issue, but i can not find the electron-pdf recipe in our server, so that it show up in the recipe list
    please let us know how i can enable this recipe so that it will show up in the recipe list.



  • This is custom recipe, you need to additionally install it

    https://github.com/bjrmatos/jsreport-electron-pdf



  • thanks, currently our JS server was installed in AWS beanstalk, i have added the 'electron-' under dependencies in package.json and redeployed the application, but still it is not showing up in recipes.

    {
    "name": "jsreport-server",
    "main": "server.js",
    "scripts": {
    "start": "node server",
    "jsreport": "jsreport"
    },
    "jsreport": {
    "entryPoint": "server.js"
    },
    "dependencies": {
    "jsreport": "1.6.0",
    "electron-prebuilt": "^1.4.13"
    }
    }



  • well you need to include both
    jsreport-electron-pdf as well as electron packages in the package.json

    Maybe it would be better for you to run beanstalk docker based configuration and specify the jsreport/jsreport:1.7.0-full image which has this recipe preinstalled, because it requires to use Xvfb on linux

    https://hub.docker.com/r/jsreport/jsreport/



  • i have included both but still not showing up in AWS, also i have installed jsserver in my local (mac), and in local also it is now showing up.
    my local package.json
    {
    "name": "jsreport-server",
    "main": "server.js",
    "scripts": {
    "start": "node server",
    "jsreport": "jsreport"
    },
    "jsreport": {
    "entryPoint": "server.js"
    },
    "dependencies": {
    "electron": "^1.6.10",
    "electron-prebuilt": "^1.4.13",
    "jsreport": "1.7.0"
    }
    }

    my dev.config.json

    {
    "certificate": {
    "key": "certificates/jsreport.net.key",
    "cert": "certificates/jsreport.net.cert"
    },
    "authentication": {
    "cookieSession": {
    "secret": "<your strong secret>"
    },
    "admin": {
    "username": "admin",
    "password": "password"
    },
    "enabled": false
    },
    "connectionString": {
    "name": "fs"
    },
    "httpPort": 5488,
    "httpsPort": null,
    "logger": {
    "console": {
    "transport": "console",
    "level": "debug"
    },
    "file": {
    "transport": "file",
    "level": "info",
    "filename": "logs/reporter.log"
    },
    "error": {
    "transport": "file",
    "level": "error",
    "filename": "logs/error.log"
    }
    },
    "blobStorage": "fileSystem",
    "phantom": {
    "strategy": "dedicated-process",
    "timeout": 60000
    },
    "electron": {
    "strategy": "dedicated-process",
    "timeout": 60000
    },
    "tasks": {
    "strategy": "dedicated-process",
    "timeout": 10000,
    "allowedModules": []
    },
    "scripts": {
    "allowedModules": [],
    "timeout": 60000
    },
    "sample-template": {
    "createSamples": true
    }
    }



  • I still don't see the jsreport-electron-pdf as dependency in your package.json. You need to add it there.



  • thank you very much yes, i have missed the 'jsreport-electron-pdf', now after adding this i am able to get the electron in the list.

    one more thing, currently i am using "blobStorage": "fileSystem". whenever i change the package.json and deploy this in AWS, i am loosing the existing data, templates, scripts etc...



  • the electron pdf is not rendering i am getting timeout error

    Error when processing render request Error during rendering report: Timeout when executing in electron Error: Timeout when executing in electron
    at Timeout._onTimeout (/var/app/current/node_modules/electron-html-to/lib/dedicatedProcessStrategy.js:272:20)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5) requestId=2
    2017-05-31T11:32:34.842Z - error: Error during processing request: http://nsreportingstaging-env.us-east-1.elasticbeanstalk.com/api/report/Invoice details: Error during rendering report: Timeout when executing in electron Error: Timeout when executing in electron
    at Timeout._onTimeout (/var/app/current/node_modules/electron-html-to/lib/dedicatedProcessStrategy.js:272:20)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)





  • hi,

    I am not familiar with xvfb and also we are not using docker.
    Please let us know how can we install jsreports using xvfb,
    Currently we have installed this in AWS using
    https://jsreport.net/blog/jsreport-on-amazon-elastic-beanstalk



  • Please help me on this, i was struck badly on this.


  • administrators

    @papegowda you don't need to use docker to configure xvfb, just try to extract the important parts of the sh file that we shared with you

    first, make sure you have xvfb and relevant dependencies for electron are installed in your system, using something like the following:

    apt-get install -y xvfb libgtk2.0-dev libxtst-dev libxss1 libgconf2-dev libnss3-dev libasound2-dev xfonts-75dpi xfonts-base
    

    then just use some commands present in our sh file, like these:

    echo Trying to remove the lock on displat 99
    rm /tmp/.X99-lock > /dev/null 2>&1
    
    echo Running display 99
    Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    
    echo Starting node.js
    export DISPLAY=:99 && node "/usr/src/app/server.js" # instead of  node "/usr/src/app/server.js" you will need to use the command that you use to start the jsreport server
    

    you can even put these commands in a sh script designed for start your jsreport app.

    try to be patient and to understand those commands, it is not much hard, just do it step by step.



  • thank you very much for your replay.

    actually the electron pdf is running in local without any issues, but when i deploy this to amazon elasticbean and there it is not working.

    and also i have included the following in .ebeextention

    .ebextensions/xvfb.config

    packages:
    yum:
    xorg-x11-server-Xvfb: []

    but still electron is giving time out error



  • hi,
    we are using 'CentOS Linux', so i am trying to install xvfb and relative dependencies for electron as per your suggestion but some of these dependencies are not available in yum install.

    Please let us know is there any link which explains on how to install these dependencies in 'CentOS Linux'


  • administrators

    hi, it must be that those dependencies has other names in the yum registry, unfortunately i don't have the equivalent names for yum, you will need to search for it on your own.

    for example in this page there are some dependencies listed for CentOS, for others dependencies not in the list you will need to search the equivalent, like "how to install xvfb on CentOS?" on Google


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.