0

I am using html-pdf module to convert a html file to pdf. Here in the header section i am not able to view the texts added in header. Its happening only in docker environment. its working fine in localhost.

`
const html = getGuideHtml(jobSection,mainContent, footer);       
        console.log(html);
        const options: CreateOptions = {
            header: {
                contents: header,
                height: '80px',
                // top:'10px'
            },
            border: {
                top: '0.3in',
                right: '0in',
                bottom: '0in',
                left: '0in',
            },
            type: 'pdf',
            format:'Letter',
            orientation: 'portrait',
            footer: {
                contents: footer,
                height: '50px',
            },
        };


# Header

 ``
    return `<div id="pageHeader">
    <table style="table-layout: fixed; color:#051f40;  width: 100%; padding-left: 25px; padding-right: 20px; border-bottom: 1px groove #051f40;">
      <tbody>
        <tr>
        <td>
        <div style="font-weight: bold; color: #051f40;" >
              <p style="margin:0; color:#051f40;">Test </p>
              </div>
              <div style="text-align: left; font-size: 8px; color: #051f40;">
                      <p style="margin:0; color:#051f40;">By: ${name} on ${formattedDate}, at ${formattedTime} ${amOrPm}.</p>
            </div>
        </td>  
        <td style="width: 100px; text-align: left; border-color: #ffffff;">
                  ${headerLogo}
        </td>          
        </tr>
      </tbody>
    </table>
  </div>`;
};``
`

Please provide a way to preview texts added in heading part

0 Answers0