my.MQJsApi4PreviewPDF
preview pdf based on base64 format
Sample Code
copy
my.call('MQJsApi4PreviewPDF',{
pdfBase64String: this.data.base64
}).then((values)=>{
my.alert({
content:JSON.stringify(values)
});
}).catch((value)=>{
my.alert({
title:'faile',
content:JSON.stringify(value)
});
})
Parameters
Name | Type | Required | Description |
pdfBase64String | string | true | 1.Convert pdf files to binary streams 2.Flow the binary through the base64string. Encoding paradigm utf-8 |
Success Callback Function
Name | Type | Required | Description |
success | bool | true | Whether the JSAPI call was successful |
code | number | true | 0:success, -1:fail |
message | string | false |