-
Notifications
You must be signed in to change notification settings - Fork 1
API Convert
damiancosmoschapman edited this page Oct 5, 2021
·
16 revisions
Home / API / Convert JSON-RPC
This page contains the JSON-RPC versions of the Create method for converting to a PDF from a URL. For the RESTful method, please go to the RESTful page for Convert.
Returns a base64 PDF string
Authentication: Anonymous
Privilege : N/A
Method: PxStat.Data.Cube_API.Create
Parameters:
Name | Type | Default | Description |
---|---|---|---|
urls |
String | null or empty | URL to convert to PDF |
chromeCommandLineOptions |
Array[String] | null or empty | Chrome Command Line Options |
printOptions |
JSON Object | null or empty | Print options |
the default value for the chromeCommandLineOptions are:
{
"chromeCommandLineOptions":[
"headless",
"disable-gpu",
"run-all-compositor-stages-before-draw"
]
}
Return: json
The Json format follow the JSON-Stat schema. Please refer to JSON-stat documentation. An example is shown below:
{
"jsonrpc": "2.0",
"result": "data:application/pdf;base64,JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9DcmVhdG9yIChDaHJvbWl1bSkKL1Byb..."
"id": "123"
}