当我在jsPDF中放入react-simple-invoice时出现错误

时间:2019-05-14 23:46:34

标签: reactjs jspdf jspdf-autotable

我得到一个空的pdf:

第一张发票PDF:

  InvoicePDF(){
    return (
      <div>
        <Invoice
          invoice={invoice}
          customer={customer}
          company={company}
          notes={
            <p>
              If you have any questions, please email{" "}
              <a href="mailto:contact@shakeshack.com">contact@shakeshack.com</a>.
            </p>
          }
        />
      </div>
    );

  }

第二张发票PDF:

/ . . .

const doc = new jsPDF();
          doc.fromHTML(ReactDOMServer.renderToStaticMarkup(this.InvoicePDF()));

doc.save("SecondTestGenerator.pdf");

结果:

一个空的PDF !!

请问有人能帮助我在jsPdf函数中使该函数可读吗

0 个答案:

没有答案