ServerResponse.renderPdf(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Generates and renders a PDF directly to the response.

Returns

void

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/https Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.xmlString

string

required

Content of the pdf.

2015.2

Errors

Error Code

Message

Thrown If

SSS_MISSING_REQD_ARGUMENT

Missing a required argument: {param name}

The options.xmlString parameter is not specified.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/https Module Script Samples.

          // Add additional code 
...
serverResponse.renderPDF({
    xmlString:'<?xml version="1.0"?>\n<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">\n<pdf>\n<body font-size="18">\nHello World!\n</body>\n</pdf>'
});
...
// Add additional code 

        

Related Topics

https.ServerResponse
N/https Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices