在我的示例应用程序中,我让用户传递一个这样的 URLhttps://www.test.com?file:///path/filename.pdf
我正在提取该文件查询并将其传递到组件中:
<ngx-extended-pdf-viewer
[src]="sourceUrl"
[handTool]="false"
[showFindButton]="true"
zoom="100%"
height="100vh"
[useBrowserLocale]="true"
></ngx-extended-pdf-viewer>
我收到“消息:缺少 PDF”的错误。file:///
有没有办法将本地路径转换为以 PDF开头的路径?