Modules
Objects/Functions
SuiteScript 2.0
{ServerResponse}.renderPdf({xmlString: {string*}})
N/http Module
ServerResponse.renderPdf()
Method Description:
Generates and renders a PDF directly to the response.
Returns:
void
Supported Script Types:
Server scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
10 units
Module:
N/http Module
Parent Object:
http.ServerResponse
Sibling Object Members:
ServerResponse Object Members
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=ServerResponse.renderPdf(options)
Example:
// Code Example 1
/**
* @NApiVersion 2.x
* @NScriptType Suitelet
*/
define(['N/xml'], function(xml) {
return {
onRequest: function(context) {
var xml = "\n" +
"\n" +
"\n" +
"\n" +
"
"src=\"NetSuiteFonts/verdana.ttf\" " +
"src-bold=\"NetSuiteFonts/verdanab.ttf\" " +
"src-italic=\"NetSuiteFonts/verdanai.ttf\" " +
"src-bolditalic=\"NetSuiteFonts/verdanabi.ttf\" " +
"bytes=\"2\"/>\n" +
"\n" +
"\nРусский текст\n" +
" ";
context.response.renderPdf(xml);
}
}
});
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4426014776.html