Check Adobe Reader is installed (C#)?

using System; using Microsoft.Win32; namespace MyApp { class Program { static void Main(string[] args) { RegistryKey adobe = Registry.LocalMachine.OpenSubKey(“Software”).OpenSubKey(“Adobe”); if(null == adobe) { var policies = Registry.LocalMachine.OpenSubKey(“Software”).OpenSubKey(“Policies”); if (null == policies) return; adobe = policies.OpenSubKey(“Adobe”); } if (adobe != null) { RegistryKey acroRead = adobe.OpenSubKey(“Acrobat Reader”); if (acroRead != null) { string[] acroReadVersions = acroRead.GetSubKeyNames(); … Read more

Security Method is No Security but Page Extraction and Document Assembly is not Allowed

In General Please be aware that the “Document Restrictions Summary” summarizes restrictions that arise from a number of factors, the following ones coming to my mind: Restrictions applied in the course of encryption When encrypting a PDF, permissions for a number of features can be restricted for a regular user. Thus, if the PDF is … Read more

iTextSharp-generated PDFs now cause Save dialog in Adobe Reader X

The problem is this line: Response.OutputStream.Write(MS.GetBuffer(), 0, MS.GetBuffer().Length) The GetBuffer method returns the entire internal buffer which is larger that the actual content. The bad PDF has about 10kb of garbage content at the end (bytes of zero), the good PDF has only a few garbage bytes. Use the ToArray() method of the memory stream … Read more

Adobe Reader Command Line Reference

You can find something about this in the Adobe Developer FAQ. (It’s a PDF document rather than a web page, which I guess is unsurprising in this particular case.) The FAQ notes that the use of the command line switches is unsupported. To open a file it’s: AcroRd32.exe <filename> The following switches are available: /n … Read more