473,698 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
programmiticall y and NOT through the

designer.

private AxAcroPDFLib.Ax AcroPDF axAcroPDF1;
private void InitializeAdobe ()
{
try
{
System.Resource s.ResourceManag er resources = new

System.Resource s.ResourceManag er(typeof(Form1 ));
this.axAcroPDF1 = new AxAcroPDFLib.Ax AcroPDF ();
((System.Compon entModel.ISuppo rtInitialize)(t his.axAcroPDF1) ).BeginInit();
this.axAcroPDF1 .Enabled = true;
this.axAcroPDF1 .Location = new System.Drawing. Point(84,
38);
this.axAcroPDF1 .Name = "axPdf1";
this.axAcroPDF1 .OcxState =

((System.Window s.Forms.AxHost. State)(resource s.GetObject("ax AcroPDF1.OcxSta te")));
this.axAcroPDF1 .Size = new System.Drawing. Size(854,
470);
this.axAcroPDF1 .TabIndex = 0;
this.Controls.A dd(this.axAcroP DF1);

((System.Compon entModel.ISuppo rtInitialize)(t his.axAcroPDF1) ).EndInit();

axAcroPDF1.Load File ("C:\\Test.pdf" );
axAcroPDF1.Show ();
}
catch (Exception ex)
{
Console.WriteLi ne (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.GetTypeFr omCLSID(guid, true);
Object o = Activator.Creat eInstance (myType);
BUT now i cant do anything further. The object returned is of type
'System.__ComOb ject'. 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 3511

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

Similar topics

0
1967
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 as a pdf I have been evaluating PDF Creator using VB6. Seems like a solid product but
2
5246
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 blank page and the earth on the top rigth corner keeps turning like it haven't read the pdf-file (for 10+ minutes on a lan). If I change the settings on the Adobe Reader 6.0 to not open in a browser, then it works fine. If I use Mozilla 1.4 then...
1
3914
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. When the application is opened by someone, it seems that if one of the Adobe 7.0 (Standard or Professional) users susequently open the application, they get the error - "...You do not have exclusive permissions to the database. Changes that you...
0
1744
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 configuered appropriately, the pdf-Files are displayed right in that Browser Control. Only problem is, when closing the Application there is a memory access violation. It occurs outside of my application, only when its Thread is just about to...
3
6591
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. Scan in your letters received to pdf format.Now insert in a form Adobe Acrobat Control For ActiveX (the pdf.ocx). Set the src property of the ActiveX control to the path of the pdf file you want to view. No problem it all works fine. Now try to...
2
1428
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 Report object. this code works with all Adobe readers except for the new 7.07. If the client has Adobe 7.07 nothing happens. With Adobe versions 5 and 6 the reader produces the Crystal Report in PDF format. Apparently they have changed...
0
1703
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 programmitically and NOT through the designer.
6
8061
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 .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply added a reference to the corresponding COM component. This this only
1
1990
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 addition, I call teh function setShowToolBar(false) and still get the toolbar loading, is there anything else that I would need to do to do this if it is even possible? The best thing would be finding some documentation about any of this, but after...
0
8608
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7732
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.