openPDFViewer
Description
Open PDF viewer
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL of the PDF file that will be loaded in the PDF viewer. |
| height | number | No | This is the height of the bottom sheet in percentage (e.g., 80). The value must not be less than 30 and not be greater than 100. Default value is 80. |
Return Value
N/A
Error Code
| Error Code | Description |
|---|---|
| 051201 | The PDF viewer's height exceed the limit height |
N/A
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.Navigator.openPDFViewer({
url: "https://zalopay.vn/",
height: 90,
})
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{ "data": {}, "status": "success" }