收藏
回答

微信小程序 能解析pdf类型 的 base64 展示出来吗?

epolicyPDF 是后端返回的,我要pdf 类型的base64 的文件流展示在小程序上,请问有方法可以做了嘛?

base64 大小为103kb 太大了,么截图全



{

    "res": {

        "policyNo": "ASHZ107E3020PAAAAAAR",

        "epolicyPDF": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyh6aC1DTikgL1N0cnVjdFRyZWVSb290IDE1IDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4+Pg0KZW5kb2JqDQoyIDAgb2JqDQo8PC9UeXBlL1BhZ2VzL0NvdW50IDEvS2lkc1sgMyAwIFJdID4+DQplbmRvYmoNCjMgMCBvYmoNCjw8L1R5cGUvUGFnZS9QYXJlbnQgMiAwIFIvUmVzb3VyY2VzPDwvRm9udDw8L0YxIDUgMCBSL0YyIDkgMCBSPj4vRXh0R1N0YXRlPDwvR1M3IDcgMCBSL0dTOCA4IDAgUj4+L1Byb2NTZXRbL1BERi9UZXh0L0ltYWdlQi9JbWFnZUMvSW1hZ2VJXSA+Pi9NZWRpYUJveFsgMCAwIDU5NS4yIDg0MS45Ml0gL0NvbnRlbnRzIDQgMCBSL0dyb3VwPDwvVHlwZS9Hcm91cC9TL1RyYW5zcGFyZW5jeS9DUy9EZXZpY2VSR0I+Pi9UYWJzL1MvU3RydWN0UGFyZW50cyAwPj4NCmVuZG9iag0KNCAwIG9iag0KPDwvRmlsdGVyL0ZsYXRlRGVjb2RlL0xlbmd0aCAyNTg+Pg0Kc3RyZWFtDQp4nLXQTUsDMRAG4Hsg/2GOW6HZySSTD1j20M1uUSxUuuKheBCpe3JB/f9gWhQKLhaFDbkMeTM8M1BuoarKTXOdAMvbp3GA4jAu73eLuoZVauBNClR4PCG4CAgcWREEq1UkeD9I8XAFoxSrXoqy06BRsYP+RQqdwwgaYv5vA3iOSkP/mmPrnYfhIzeG4VSFr2otBSyPac7B533hePEI/Y0UbW5+lx/bTQNwJtbziDVqhfFMfIL+9FnH3/cClP5loymbs8r6Sdu+IuqcsSYYjZ1haqkNntCTs5S4TYY4JdKxIxOZrEMXAte/y808KzZ5xWF6igIuLNPORfIK/2L6BBDWpX0NCmVuZHN0cmVhbQ0KZW5kb2JqDQo1IDAgb2JqDQo8PC9UeXBlL0ZvbnQvU3VidHlwZS9UcnVlVHlwZS9OYW1lL0YxL0Jhc2VGb250L0FCQ0RFRSvnrYnnur8vRW5jb2RpbmcvV2luQW5zaUVuY29kaW5nL0ZvbnREZXNjcmlwdG9yIDYgMCBSL0ZpcnN0Q2hhciAzMi9MYXN0Q2hhciA1NC9XaWR0aHMgMzAgMCBSPj4NCmVuZG9iag0KNiAwIG9iag0KPDwvVHlwZS9Gb250RGVzY3JpcHRvci9Gb250TmFtZS9BQkNERUUr562J57q/L0ZsYWdzIDMyL0l0YWxpY0FuZ2xlIDAvQXNjZW50IDgxMC9EZXNjZW50IC0yMzIvQ2FwSGVpZ2h0IDgxMC9BdmdXaWR0aCA0NDcvTWF4V2lkdGggMTI5Mi9Gb250V2VpZ2h0IDQwMC9YSGVpZ2h0IDI1MC9TdGVtViA0NC9Gb250QkJveFsgLTE0MSAtMjMyIDExNTEgODEwXSAvRm9udEZpbGUyIDI4IDAgUj4+DQplbmRvYmoNCjcgMCBvYmoNCjw8L1R5cGUvRXh0R1N0YXRlL0JNL05vcm1hbC9jYSAxPj4NCmVu

回答关注问题邀请回答
收藏

1 个回答

  • wuy
    wuy
    2020-03-11

    我也遇到了同样的问题,有解决办法吗

    2020-03-11
    有用
    回复 1
    • 小李不小
      小李不小
      2020-03-11
      没办法解决,要么就是后台把pdf转为图片,返回base64的图片前端展示,还有就是返回一个pdf链接,直接打开
      2020-03-11
      回复
登录 后发表内容
问题标签