locked
[W8.1]Open File docx,xlsx,pdf in window store app RRS feed

  • Question

  • Hi. 

    current, i using visual studio 2015, i writing for tablet window 8.1(window store app).

    i would like open file docx, xlsx, pdf in tablet, i have find component, source, library but not found.

    you can help me.

    thanks you!

    Thursday, October 22, 2015 4:17 AM

Answers

All replies

  • Hi,

    The Windows 8.1 Preview adds a PDF viewer API. See the  PDF viewer sample (Windows 8.1)

    For office files, you can launch the app into the default office viewer with LaunchFileAsync:

    private async void Button_Click(object sender, RoutedEventArgs e)
    {
                StorageFile docFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///assets/test.docx"));
                await Launcher.LaunchFileAsync(docFile);
    }

    See this thread: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/5d5d1ee2-fa96-4ad0-b6df-d3570bf6733e/open-a-pdf-file-from-windows-store-app?forum=winappswithcsharp


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 22, 2015 9:50 AM
  • Hi.

    Thanks for your answer!

    at the moment, I want to have component can embed the file format doc, ppt, excel to my app (winrt) or convert ppt to pdf,image.

    after i will action on it,

    i don't want open by LaunchFileAsync.

    i used syncfusion for winrt (can open file word, excel).

    can you help me embed file power point (ppt,pptx) in my app.

    Thanks you!


    Friday, October 23, 2015 7:05 AM
  • Hi,

    >>can you help me embed file power point (ppt,pptx) in my app

    I haven't seen a WinRT API or third-party control for PowerPoint, the only possible way is to call web service and this service need to convert PPT to images and transport to your app.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 23, 2015 9:45 AM
  • Thank you so much!
    Friday, October 23, 2015 10:10 AM