Print Preview not showing as HTML insight

Print Preview not showing as HTML insight

ischava780225ischava780225 Posts: 3Questions: 0Answers: 0

Hello,

I have an problem, I have some amount in blue and bold on html table but on Print Preview option is not showing the same as the html.

Is a way to do the same as html?

thanks in advance.

Replies

  • colincolin Posts: 8,013Questions: 0Answers: 1,348

    Hi @ischava780225 ,

    This example should help, it's showing the same for the PDF export.

    Cheers,

    Colin

  • ischava780225ischava780225 Posts: 3Questions: 0Answers: 0

    Hello,

    I don't see the PDF export button in the example.

    Thanks in advance.

    ischava780225

  • colincolin Posts: 8,013Questions: 0Answers: 1,348

    Sorry, not sure what happen there - please try this one: http://live.datatables.net/himajoxo/1/edit

  • ischava780225ischava780225 Posts: 3Questions: 0Answers: 0

    Hello Colin,

    I changed my code with the new one but when I clicked the button, it is not in blue and it is not showing the print preview section.

    Thanks in advance.

    ischava780225

  • kthorngrenkthorngren Posts: 8,082Questions: 25Answers: 1,816

    You are getting the following error in your browsers console:
    Uncaught ReferenceError: table is not defined

    In the customize function you need to change the code that Colin provided to make the comparison you want. It would follow along the lines of what you have in createdRow.

    Kevin

  • PerroNegroPerroNegro Posts: 1Questions: 0Answers: 0
    edited August 2019

    I find the trouble for my case = preview shows all empty. My CSS personal style was the problem (try print button datatables without your CSS style).
    Solution: I create a second CSS for print, with media="print", and add media="screen" for the normal CSS style:
    normal CSS:
    <link rel="stylesheet" href="./assets/css/espaciodetrabajo.css" media="screen">
    printer CSS
    <link rel="stylesheet" href="./assets/css/imprimir.css" media="print">

    Try this simple CSS for print:

    ** body {**
    font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
    ** }**

    (Sorry for my english, anyway, I hope this help)

Sign In or Register to comment.