locked
how to open a pdf files using sqlite in Windows store

    Question

  • Hi,

    I have done with fetching of File path from Sqlite for PDF I am getting the path but the PDF is not Displaying.Got the Exception like "FILE not Found'.Would anyone Suggest me the best solution for this

    Thanks


    m venkatasuresh

    Friday, September 12, 2014 2:21 PM

Answers

All replies

  • Break the problem down: Is the path correct? Does the file actually exist? If you close the app and launch the file from explorer does it open?

    This will suggest where to look for the problem, and if you still need help let us know what your code does for that phase.

    Friday, September 12, 2014 3:23 PM
    Owner
  • Hi,

    yes the path that i have given is Correct.Even i tried to convert the pdf into image then it is opening in launcher.

    if i tried with .pdf Extension it is showing "System.IO.FileNotFoundException" . i have one solution when i try to open from picker option the pdf is Showing.when i try to call the pdf directly from Sqlite by using filepath the path it is showing but it is not Displaying.

    By using Fileopen picker im getting Filetype Filter to open (.pdf) Extension

     var picker = new FileOpenPicker();
     picker.FileTypeFilter.Add(".pdf");

    But i want to open Directly PDF by using the path ..Is that possible?If possible please let me know

    Thanks.

     


    m venkatasuresh

    Monday, September 15, 2014 5:46 AM
  • You need to use the StorageFile returned from the FileOpenPicker, not the path. Your app doesn't have access to see the file directly. It needs to go through the StorageFile broker to use the permissions granted by the picker.

    See my blog entry Skip the path: stick to the StorageFile   

    Tuesday, September 16, 2014 1:14 AM
    Owner