1

我想从独立存储中读取一个 Pdf 文件并将其显示在 pdf 查看器中。但据我所知,Windows phone 8 没有 pdf 控件。我可以使用任何第三方控件吗?或者有没有其他方法可以在 Windows phone 8 应用程序中显示 pdf 文件。

4

2 回答 2

3

你有三个路线:

  1. 启动 pdf,这将导致它在另一个应用程序中打开
  2. 为已经实施的控制付费,例如这个。注意他们是如何将一堆东西捆绑在一起的,所以你不会只是得到一个 pdf 查看器
  3. 制作自己的 pdf 查看器,这绝对是最难的方法。

编辑:如何启动与文件关联的应用程序:

StorageFolder folder = ApplicationData.Current.LocalFolder;
StorageFile file = await folder.GetFileAsync(<filename>);
Launcher.LauncheFileAsync(file);

您可以在任何需要的地方调用它。

于 2013-08-08T12:07:21.627 回答
1
// get the assets folder for the app
StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Folder");

// get the file included in app "Folder"
StorageFile file = await folder.GetFileAsync("test.pdf");
于 2013-08-09T11:28:11.747 回答