Note that there are some explanatory texts on larger screens.

plurals
  1. POCheck if there is any kind of PDF Reader installed
    primarykey
    data
    text
    <p>I have a <code>Help</code> function in my <code>Application</code>, that consists of one <code>webbrowser control</code>. That <code>webbrowser control</code> gets filled with a <code>.pdf file</code>, the source for that <code>.pdf file</code> is our own website.</p> <p>The problem is, that not everyone will have a <code>PDF Reader</code> installed on their machine, so I want to check whether one is installed: Yes or No. I searched the internet and I mostly saw that users on Stackoverflow where wanting to check if <code>Adobe Reader</code> was installed, that is not what I want. I need to know IF there is a <code>PDF Reader</code> somewhere installed on the machine.</p> <p>I did find the following code, that can possibly help me:</p> <pre><code>public void CheckPdfReaderAvailable() { RegistryKey key = Registry.ClassesRoot.OpenSubKey(".pdf"); Assert.IsNotNull(key); } </code></pre> <p>As I look at the above code, my thoughts are that the code checks if the <code>registry</code> does know the <code>.pdf format</code>, but I'am not sure.</p> <p>Can somebody tell me how to use the code above or provide me an example, about how I should take down this problem?</p> <p>Thanks in advance!</p> <p><strong>EDIT:</strong></p> <p>The following answer helped my out: <a href="https://stackoverflow.com/a/774482/1661209">https://stackoverflow.com/a/774482/1661209</a></p> <p>Another way to solve this problem, is to add a pdf reader lite to the prerequisites and make the users install that first, you don't have to check for a pdf Reader, because you know one is installed then, if it isn't you could say it is the mistake of the user that they can't use the help function, because you offered them a way to install the pdf reader easily using the published project.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload