locked
Show PDF files inside my application RRS feed

  • Question

  • Hi,

    i developed an application which communicates with a server. In one step, i want to receive a pdf file.
    Is it possible to show the pdf inside my application, like the pdf reader integrated into firefox.
    Or is it possible to launch a pdf reader and show the pdf, and after closing the pdf reader, get back to my application?

    Maybe someone got the same issues and solved it already.

    Regards,
    Daniel
    Monday, October 26, 2009 9:55 AM

Answers

  • Hi Daniel,

    Provided that the device has a PDF reader installed, you can use ShellExecuteEx to open the PDF file in the PDF reader. Here is a sample code:

        SHELLEXECUTEINFO info = {0};
        info.cbSize = sizeof(info);
        info.lpFile = L"path to the PDF file";
        ShellExecuteEx(&info);

    Regards,
    Chunsheng Tang


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentang Friday, October 30, 2009 2:54 AM
    Wednesday, October 28, 2009 8:41 AM
  • Hi Daniel,

    If you are using C#, you can try this. But PDF reader should be installed already.

    System.Diagnostics.Process.Start("path to document");

    Regards,
    Malleswar
    • Marked as answer by warrentang Friday, October 30, 2009 2:54 AM
    Wednesday, October 28, 2009 12:07 PM

All replies

  • Hi Daniel,

    Provided that the device has a PDF reader installed, you can use ShellExecuteEx to open the PDF file in the PDF reader. Here is a sample code:

        SHELLEXECUTEINFO info = {0};
        info.cbSize = sizeof(info);
        info.lpFile = L"path to the PDF file";
        ShellExecuteEx(&info);

    Regards,
    Chunsheng Tang


    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentang Friday, October 30, 2009 2:54 AM
    Wednesday, October 28, 2009 8:41 AM
  • Hi Daniel,

    If you are using C#, you can try this. But PDF reader should be installed already.

    System.Diagnostics.Process.Start("path to document");

    Regards,
    Malleswar
    • Marked as answer by warrentang Friday, October 30, 2009 2:54 AM
    Wednesday, October 28, 2009 12:07 PM