Pregunta

I want to read a Pdf file from the Isolated Storage and Display it in a pdf viewer. But to my knowledge Windows phone 8 doesnt not have a pdf control. Is there any third party control I can use? or Is there any other way to display the pdf file in Windows phone 8 app.

¿Fue útil?

Solución

You have three routes:

  1. Launch the pdf, which would cause it to be opened in another application
  2. Pay for an already implemented control, such as this one. Note how they bundle a bunch of stuff together, so you won't just get a pdf viewer
  3. Make your own pdf viewer, which is definitely the hardest way.

Edit: How to launch an app associated with a file:

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

You can call this from wherever you need it.

Otros consejos

// 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");
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top