Skip to content

Opening pdf file in windows application using c#

maruthi

Asked May 3, 2008, 1:50 AM EDT1 answer
Share
LinkedInX
Hi ,
 
 i have try to open an PDF file in windows application using C#  I was getting an error that type should not be null following is the code . Please Help me Urgent.


 Acrobat.CAcroApp app = (Acrobat.CAcroApp)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.App"));
            app.Show();

            Acrobat.CAcroAVDoc doc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.AVDoc"));

            doc.Open(FileName, "Computed Mileage");  

Error Message is
Value cannot be null.
Parameter name: type

Thank u ,
Maruthi.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.