【问题标题】:Can I add a document from the file cabinet at the end of a generated pdf?我可以在生成的 pdf 末尾添加文件柜中的文档吗?
【发布时间】:2019-10-02 23:27:04
【问题描述】:

我在 suitescript 中使用 nlapiXMLToPDF 来生成 PDF。我在文件柜中有一个文件,我想在生成的 PDF 文件末尾添加一个文件。这可以吗?

    var file = nlapiXMLToPDF(xml);
    response.setContentType('PDF', 'formalQuote.pdf');
    response.write(file.getValue());

【问题讨论】:

    标签: netsuite suitescript


    【解决方案1】:

    是的。为此,您需要更改 XML 以将另一个文件作为单独的 <pdf> 包含在 <pdfset> 中。

    之前:

    <?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
    <pdf>
        *CODE*
    </pdf>
    

    之后:

    <?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
    <pdfset>
    <pdf>
        *CODE*
    </pdf>
    <pdf src=*link to file cabinet document*></pdf>
    </pdfset>
    

    【讨论】:

    • 感谢您的帮助!
    • 请注意,您从文件柜中包含的 pdf 需要“无需登录即可使用”才能正常工作。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多