我有一个UWP托管Web应用程序(空白Javascript)我用来包装一个嵌入了PDF的本地托管网站 . PDF显示在由Vue.js提供支持的单页应用程序中 .

目的是在运行Windows 10 Pro的计算机上创建一个锁定的自助服务终端 .

我已经验证了可以从Edge浏览器在目标计算机上本地访问URL,并且每个PDF都可见,但PDF不会在UWP应用程序中显示 .

为了进一步测试,我发现了一个包含四种方式的示例PDF的网站:https://pdfobject.com/static.html . 所有四个PDF在MS Edge中加载正常,但在我的应用程序中根本不加载 .

使用该测试网址的示例package.appxmanifest:

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" IgnorableNamespaces="uap mp uap3 uap4">
  <Identity Name="SampleFoodsKiosk" Version="1.0.19.0" Publisher="CN=self" />
  <mp:PhoneIdentity PhoneProductId="2b72d1a3-29c9-4694-8514-09e553e6377a" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
  <Properties>
    <DisplayName>Sample Foodservice Kiosk</DisplayName>
    <PublisherDisplayName>Self</PublisherDisplayName>
    <Logo>images\storelogo.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  </Dependencies>
  <Resources>
    <Resource Language="x-generate" />
  </Resources>
  <Applications>
    <Application Id="App" StartPage="https://pdfobject.com/static.html">
      <uap:ApplicationContentUriRules>
        <uap:Rule Match="http://www.Samplekiosk.com" Type="include" WindowsRuntimeAccess="all" />
        <uap:Rule Match="http://Samplefoods" Type="include" WindowsRuntimeAccess="all" />
        <uap:Rule Match="https://pdfobject.com/static.html" Type="include" WindowsRuntimeAccess="all" />
      </uap:ApplicationContentUriRules>
      <uap:VisualElements DisplayName="Sample Foods" Description="Sample Foodservice Kiosk" BackgroundColor="transparent" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
        <uap:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" Square310x310Logo="images\LargeTile.png" Square71x71Logo="images\SmallTile.png"></uap:DefaultTile>
        <uap:SplashScreen Image="images\splashscreen.png" />
      </uap:VisualElements>
      <Extensions>
        <uap:Extension Category="windows.lockScreenCall" />
        <uap:Extension Category="windows.aboveLockScreen" />
      </Extensions>
    </Application>
  </Applications>
  <Capabilities>
    <Capability Name="internetClient" />
  </Capabilities>
</Package>

托管的Web应用程序是否无法显示嵌入的PDF?如果是这样,我可以使用哪种方法来显示内联PDF?

获取在UWP中显示的PDF的其他帖子似乎专注于阅读流并将其显示为图像,但我不确定如何使用托管应用程序(即使它是本地的) .

我试过的其他事情:

  • Chrome Kiosk通过更换shell(在Win10 Pro中不起作用)

  • 添加每个可用的UWP功能