Windows phone 8 apps RRS feed

  • Question

  • Hi

    How to read the PDF file in windows phone 8 apps.

    we want the PDF viewer in windows phone 8 apps. i have searched in google but not getting the proper information.

    Please suggest us..!

    Wednesday, May 29, 2013 2:34 PM

All replies

  • Wednesday, May 29, 2013 7:47 PM
  • Do you want to open/show a PDF file inside your application or do you wish to open a PDF file in another application (like launching a PDF reader from browser)?

    For the first, I am not aware if there are any free PDF viewing controls.

    For the second, you can open a file in the program that is registered to open a file ending with .pdf. Take a look here: Auto-launching apps using file and URI associations for Windows Phone 8.

    Toni Petrina
    My blog: Toni codes .NET
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful"

    Wednesday, May 29, 2013 8:09 PM
  • hi,

    I am trying to launch pdf file from locally to my apps.

    for that i have tried this code.

     string Pdffilename = @"Assets\LocalFile.pdf";

                    // Get the image file from the package's image directory
                    var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(Pdffilename);
                    if (file != null)
                        // Set the recommended app
                        var options = new Windows.System.LauncherOptions();

                        bool success = await Windows.System.Launcher.LaunchFileAsync(file, options);
                        if (success)
                            // File launched
                            // File launch failed
                        // Could not find file

    but i am not getting the file pdf file.

    I am getting the Error : "value does not fall within the expected range".

    i have tried so many ways to getting the file  .but not able to get the pdf file.

    Please suggest us..!

    Thursday, May 30, 2013 8:43 AM