Print button is generating document with blank empty space

Print button is generating document with blank empty space

khojiabrorkhojiabror Posts: 6Questions: 1Answers: 0

Hello we are using your datatables in our ASP.NET MVC Project as it was already purchased and used by frest - https://pixinvent.com/frest-bootstrap-html-admin-template/ . When using your datatable with HMTL5 export buttons, when we press Print it's opening another blank tab in browser, getting values from datatable however when browser's built-in print window pops-up it's having the exact number of pages equalt to datatable's source but empty blank white space. Please help to solve this issue

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    edited June 13

    Its hard to say without seeing the problem. This example works. Blank output suggests something in your environment is applying styling that is causing the blank page. This SO thread has an example.

    Maybe contact the Frest support to see if they know of print button styling conflict issues with their integration of Datatables. Otherwise a test case will be needed to help debug the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • khojiabrorkhojiabror Posts: 6Questions: 1Answers: 0

    @kthorngren Dear Kevin,
    Thanks for your answer. As I am not good at front-end I am having a lot of problems related with datatable, namely:
    1) my frest theme only included copy, pdf, json, print HTML5 Export buttons. I tried to add excel button as well to datatable.js, but unsuccesful.
    2) print button is giving me print with content, it's generating print pages based on table's data volume however, blank empty page.
    3) I want to use datatables' add row functionality, again frest built-in feature is allowing only to add .1, .2, .3, .4, .5 rows respectively, can't adjust based on my code logic.
    We are running out of time as we need to complete this project and publish to customer's server. Can you please help me to fix the issues once i provide all included css and javascript files? I direct messaged you asking for your email.
    Thanks in advance

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    1. Make sure you have included the JSZip requirement. See the Built-in buttons doc for more info. Use the Download Builder to get the appropriate files.
    2. We will need to see a running example of the issue to interactively debug the styling conflict.
    3. To add one row use row.add() or to added multiple (array) of rows use rows.add(). Again for specific help we will need to see the running environment to offer more specific suggestions.

    Contact @allan directly, using the Ask a Private Question button above, for support options.

    Kevin

  • khojiabrorkhojiabror Posts: 6Questions: 1Answers: 0
    1. Video of output
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Maybe contact the Frest support to see if they know of print button styling conflict issues with their integration of Datatables.

    Did you do that?

    Make sure you have included the JSZip requirement. See the Built-in buttons doc for more info. Use the Download Builder to get the appropriate files.

    Did you do that?

    We will need to see a running example of the issue to interactively debug the styling conflict.

    Did you see that?

  • khojiabrorkhojiabror Posts: 6Questions: 1Answers: 0
    edited June 13

    Maybe contact the Frest support to see if they know of print button styling conflict issues with their integration of Datatables.
    Did you do that?

    ! It's working when you try to print with template, it's not working as I explained only when you implement it in ASP.NET MVC (C#) application

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    edited June 13

    We saw the video. Its nearly impossible to troubleshoot a video.

    it's not working as I explained only when you implement it in ASP.NET MVC (C#) application

    That suggests the ASP.NET MVC (C#) environment is applying some sort of styling causing the blank print output. We will need to see the issue to help debug.

    Have you looked at the SO thread I linked to? One person found this CSS to cause the issue:

    @media print {
      body * {
        visibility: hidden;
      }
    

    Likely you have something similar in your environment. But its hard to say exactly what is causing the issue without the ability to debug.

    Kevin

Sign In or Register to comment.