473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Adobe ActiveX Control problem in C#

Hi All,

I have made an application that loads an Adobe Acrobat file and shows
it. For this I ve used Adobe ActiveX

Control available in C#. Heres a sample code. I am adding the control
programmitically and NOT through the

designer.

private AxAcroPDFLib.AxAcroPDF axAcroPDF1;
private void InitializeAdobe()
{
try
{
System.Resources.ResourceManager resources = new

System.Resources.ResourceManager(typeof(Form1));
this.axAcroPDF1 = new AxAcroPDFLib.AxAcroPDF ();
((System.ComponentModel.ISupportInitialize)(this.a xAcroPDF1)).BeginInit();
this.axAcroPDF1.Enabled = true;
this.axAcroPDF1.Location = new System.Drawing.Point(84,
38);
this.axAcroPDF1.Name = "axPdf1";
this.axAcroPDF1.OcxState =

((System.Windows.Forms.AxHost.State)(resources.Get Object("axAcroPDF1.OcxState")));
this.axAcroPDF1.Size = new System.Drawing.Size(854,
470);
this.axAcroPDF1.TabIndex = 0;
this.Controls.Add(this.axAcroPDF1);

((System.ComponentModel.ISupportInitialize)(this.a xAcroPDF1)).EndInit();

axAcroPDF1.LoadFile ("C:\\Test.pdf");
axAcroPDF1.Show ();
}
catch (Exception ex)
{
Console.WriteLine (ex.ToString ());
}
}

This codes works fine. This sample is written using Adobe ActiveX
Control 7.0. Now the problem is that i cant

run this application is Adobe Acorbat 6.0 is installed and NOT Adobe
7.0. In other words i m facing

compatibility issues. Same is the case if I make the application using
Adobe ActiveX Control 6.0 and then run

it when Adobe 7.0 is installed.
Is there any way I can make it 'generic'. Client may have 6.0 or 7.0 or
any other version installed. I want my

application to work in all circumstances......or atleast in both 6.0
and 7.0. I ve searched for and havent

found anything solid. There are similar questions regarding this
problem but none of them have been answered.
I ve tried something else also :

Guid guid = new Guid
("{ca8a9780-280d-11cf-a24d-444553540000}");
Type myType =Type.GetTypeFromCLSID(guid, true);
Object o = Activator.CreateInstance (myType);
BUT now i cant do anything further. The object returned is of type
'System.__ComObject'. I guess if ANY COM

object is used it will always return this. I ve tried casting the
object to the appropriate library but it

throws exception (invalid cast).

is there anyway that an application built in any version work with all
other versions OR atleast if an

application uses the latest Adobe it would run on earlier ones too.

ANY idea regarding this issue is most welcome.

Thanks
Danyal

Aug 8 '06 #1
0 1670

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Raoul Watson | last post by:
Hi all.. Was wondering if anyone knows an activex/ocx that can: read pdf file (to include fillable forms) able to fill in data programmatically able to print able to save the data back out...
2
by: Jens S0nderby Munk | last post by:
Hi, I'm having some problems with the Reponse.BinaryWrite, IE 6.0 and Adobe Reader 6.0. When I try to write a pdf-file to an IE browser with a Adobe Reader 6.0 installed then it just displays a...
1
by: JohnC | last post by:
I have this exact same scenario. It is new and seems to be related to when we installed Adobe 7.0 Standard/Professional. We have an MDB on a LAN file server. Using Access 2K and Windows 2K. ...
0
by: philipp | last post by:
I have the following problem: My client application (c#, WindowsForms) uses the IE Browser ActiveX Control to display either HTML or PDF files. This is fine so far. If the Acrobat Reader is...
3
by: moroni | last post by:
No problem 2 set Access up to get address data from tblClients then to use a form as a letterhead and to keyboard in the letter content then save the letter to a tblCorrespondence Get a scanner....
7
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
2
by: GaryDean | last post by:
( First, I'm using .net 1.1 and, yes, I posted this problem on the Adobe Forums but that won't do any good because they have very poor support) In the code pasted below, MyReport is a Crystal...
0
by: s.danyal.k | last post by:
Hi All, I have made an application that loads an Adobe Acrobat file and shows it. For this I ve used Adobe ActiveX Control available in C#. Heres a sample code. I am adding the control...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
1
by: koerslight | last post by:
I am using the Adobe Acrobat Control for ActiveX (axpdflib) on my form. However, when the form loads, the thumbnails are completely grayed out. Does anyone have any insight as to this? In...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.