Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Unable to render table row color using CreatePDFDynamic

New Here ,
Oct 29, 2021 Oct 29, 2021

Hi all, I'm trying to get my node.js app to generate a PDF of a table with some data on it.

I am using createPdfFromDynamicHtml.

My data got successfully rendered, but not their row color. 

 

row.style.backgroundColor = `green`;

 

This results in: 

Screen Shot 2021-10-30 at 10.24.11 AM.png

Notice that the my bootstrap rounded edge style at <th> is poorly applied also. 

It seems to me that the parser is somehow taking a snapshot earlier than it should?

 

Here is a snippet of where I put my code in index.html

 

</head>
<body class="spectrum spectrum--medium spectrum--light" onload = "initial()">
  <script src="./json.js"></script>
  <script type="text/javascript">
    function initial() {
      var document = window.document;

 

 

When looking at index.html in a browser, the rows are colored as intended.

368
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources