1 Replies - 1241 Views - Last Post: 16 June 2009 - 10:32 PM Rate Topic: -----

#1 sachin635   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 10-September 08

How to get the PDF document which is currently opened?

Posted 16 June 2009 - 09:28 PM

This is the thing I was re-posting from here
http://www.dreaminco...howtopic=110280

when a PDF file is opened, AcroRd32.exe is started automatically, and we get the GUID value of that adobe reader.
In c#, can't we get the document associated with the GUID value, I mean the total PDF file which is opened in adobe reader at runtime.
Here I'm struck up in code, can anyone suggest how to where I was missing something.

Acrobat.CAcroAVDoc AcroAvDoc;
Type AcrobatCAcroType;
  AcrobatCAcroType = Type.GetTypeFromCLSID(new Guid("{CA8A9780-280D-11CF-A24D-444553540000}"));  This CLSID is of adobe reader's.
			 
///////Here I think I'm missing something

Object obj = Activator.CreateInstance(AcrobatCAcroType);
AcroAvDoc = (Acrobat.CAcroAVDoc)obj;


I think I can get the full PDF document with AcroAvDoc.GetPDDoc() ;

Is there any way to know which the PDF is currently opened.
If there are many instances of Acrobat Reader are obtained, then also, I have to get all the PDF documents opened.
How can I do this?
Don't Say that "You can't do this", I think there will be definitely something to do this.
any suggestion can be posted here.
Thank You...

Is This A Good Question/Topic? 0
  • +

Replies To: How to get the PDF document which is currently opened?

#2 noorahmad   User is offline

  • Untitled
  • member icon

Reputation: 209
  • View blog
  • Posts: 2,290
  • Joined: 12-March 09

Re: How to get the PDF document which is currently opened?

Posted 16 June 2009 - 10:32 PM

ok i have an idea, you can get it through Process.
and also it depends on your Acrobat Version.
Process[] pro = Process.GetProcesses();
			foreach (Process  str in pro)
			{
				if (str.ProcessName.Contains("Acrobat"))
				{
					MessageBox.Show("Found");
				}
			}

hope it will help you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1