Search code examples
c#pdfwindows-phone-8pdf-viewer

Read and Display PDF file from Isolated Storage in a windows phone 8 app


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.


Solution

  • 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.