Data URI Hash Parameters (Hide PDF toolbar for data URI)

前端 未结 4 2089
既然无缘
既然无缘 2021-02-15 04:00

I have a PDF base64 encode data URI.

eg:

return 

        
      
      
      
4条回答
  •  情话喂你
    2021-02-15 04:42

    Yesterday I was also facing similar problem and found a working solution. When you are using base64 in URI and trying to set default behavior none(#toolbar=0&navpanes=0&scrollbar=0&), src is not able to detect the boundary starting with '#'. You can get wanted result with this instead data:application/pdf;#toolbar=0&navpanes=0&scrollbar=0&;base64,your_base64_string. As per your code you can return like this:

    return 
    

    I hope this may help you and others.

提交回复
热议问题