Skip to main content

openPDFViewer

Description​

Open PDF viewer

Parameters​

ParameterData TypeRequiredDescription
urlstringYesThe URL of the PDF file that will be loaded in the PDF viewer.
heightnumberNoThis 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 CodeDescription
051201The 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" }