代码之家  ›  专栏  ›  技术社区  ›  young B

html pdf。呈现表工作不好

  •  1
  • young B  · 技术社区  · 6 年前

    我在用 html-pdf 似乎一切都很好。但是页面末尾的表行看起来像坏了。给你结果。 enter image description here

    我已经在规则中使用了分页符。我还把DIV放在桌子的格子里。这些都帮不了我。

    流星 + 捆绑。

    const config= {
        "format": "A4",
        "orientation": "portrait",
        "border": {
            "top": "0.2in",
            "right": "0.2in",
            "bottom": "0.2in",
            "left": "0.2in"
        },
        "timeout": "120000",
        "type": "pdf",
    }
    

    服务器端代码:

    pdf.create(html, config).toFile(_storage_path, Meteor.bindEnvironment((err, res) => { .... }));
    

        const html = ReactDOM.findDOMNode(this.refs.PDF).outerHTML; 
        Meteor.call('vote.toPDF', html , function(res, err) {...});
    

    有没有办法避免划船?我错过什么了吗?

    0 回复  |  直到 6 年前