【问题标题】:i can't render a image in pdf-creator-node headeri can\'t render a image in pdf-creator-node header
【发布时间】:2022-12-01 22:18:46
【问题描述】:
const options = {
        format: 'Letter',
        orientation: 'portrait',
        border: '0mm',
        header: {
            contents: `
            <div class="headerPDF">
                <img src="https://helpx.adobe.com/content/dam/help/en/photoshop/using/convert-color-image-black-white/jcr_content/main-pars/before_and_after/image-before/Landscape-Color.jpg"/>
                <h1>test</h1>
            </div>
            <style>
                .headerPDF{
                    width: 90%;
                    height: 60%;
                    border-bottom: 1px solid black;
                }
                .headerPDF > img{
                    width: 100px;
                    border: 1px solid black;
                }
            </style>
            `,
        },
        footer: {
            height: '0mm',
            contents: '',
        },
        childProcessOptions: { env: { OPENSSL_CONF: '/dev/null' } },
    }

This is a code of options and this image, don't render for nothing

and this is the output of the code

i try to put the path in the variable and i try to change many options

【问题讨论】:

    标签: javascript node.js html-pdf node-html-pdf pdfcreator


    【解决方案1】:

    you can resolve add other img tag in your html, https://github.com/hajareshyam/pdf-creator-node/issues/16#issue-647275882

    【讨论】:

      猜你喜欢
      • 2022-12-27
      • 2022-12-02
      • 2022-12-26
      • 2022-12-01
      • 2022-12-27
      • 2022-12-01
      • 2022-12-27
      • 2022-12-26
      • 2022-12-02
      相关资源
      最近更新 更多