Objectmix
Tags Register Mark Forums Read

waiting for acrobat to load : CSharp

This is a discussion on waiting for acrobat to load within the CSharp forums in Programming Languages category; I'm calling acrobat to open through code: FileInfo fi = new FileInfo(filePath); Type AcrobatAppType; AcrobatAppType = Type.GetTypeFromProgID("AcroExch.App"); Acrobat.CAcroApp oAdobeApp = (Acrobat.CAcroApp)Activator.CreateInstance(AcrobatAppType); Type AcrobatPDDocType; AcrobatPDDocType = Type.GetTypeFromProgID("AcroExch.PDDoc"); Acrobat.CAcroPDDoc oAdobePDDoc = (Acrobat.CAcroPDDoc)Activator.CreateInstance(AcrobatPDDocType); oAdobePDDoc.Open(filePath); int pdfPages = 1 + oAdobePDDoc.GetNumPages(); Type AcrobatAvType; AcrobatAvType = Type.GetTypeFromProgID("AcroExch.AVDoc"); Acrobat.CAcroAVDoc oAdobeAVDoc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(AcrobatAvType); oAdobeApp.Show(); oAdobeAVDoc.Open(filePath, filebatesThis); oAdobeAVDoc.BringToFront(); oAdobeAVDoc.GetTitle(); oAdobeApp.MenuItemIsEnabled("SelectAll"); oAdobeApp.MenuItemIsEnabled("Copy"); "THEN" try { oAdobeApp.MenuItemExecute("SelectAll"); oAdobeApp.MenuItemExecute("Copy"); } catch (Exception selectCopy) { MessageBox.Show(selectCopy.ToString()); } My problem is that some of my PDF files are HUGE and the program I am running moves beyond this step before the file is loaded. Is there some way for me to wait for ...


Object Mix > Programming Languages > CSharp > waiting for acrobat to load

Reply

 

LinkBack Thread Tools
  #1  
Old 07-11-2009, 07:15 PM
Junior Member
 
Join Date: Jul 2009
Posts: 0
jasondemon is on a distinguished road
Unhappy waiting for acrobat to load

I'm calling acrobat to open through code:
FileInfo fi = new FileInfo(filePath);
Type AcrobatAppType;
AcrobatAppType = Type.GetTypeFromProgID("AcroExch.App");
Acrobat.CAcroApp oAdobeApp = (Acrobat.CAcroApp)Activator.CreateInstance(AcrobatAppType);

Type AcrobatPDDocType;
AcrobatPDDocType = Type.GetTypeFromProgID("AcroExch.PDDoc");
Acrobat.CAcroPDDoc oAdobePDDoc = (Acrobat.CAcroPDDoc)Activator.CreateInstance(AcrobatPDDocType);
oAdobePDDoc.Open(filePath);
int pdfPages = 1 + oAdobePDDoc.GetNumPages();

Type AcrobatAvType;
AcrobatAvType = Type.GetTypeFromProgID("AcroExch.AVDoc");
Acrobat.CAcroAVDoc oAdobeAVDoc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(AcrobatAvType);
oAdobeApp.Show();
oAdobeAVDoc.Open(filePath, filebatesThis);
oAdobeAVDoc.BringToFront();
oAdobeAVDoc.GetTitle();
oAdobeApp.MenuItemIsEnabled("SelectAll");
oAdobeApp.MenuItemIsEnabled("Copy");

"THEN"

try
{
oAdobeApp.MenuItemExecute("SelectAll");
oAdobeApp.MenuItemExecute("Copy");
}
catch (Exception selectCopy)
{
MessageBox.Show(selectCopy.ToString());
}


My problem is that some of my PDF files are HUGE and the program I am running moves beyond this step before the file is loaded. Is there some way for me to wait for the program to load other than system.threading.wait??? I mean, that is iffy at best. I was thinking maybe I can create an instance of a process and attach the acrobat.exe that is running to that process and do a process.waitforidle, but I don't know 1, if that will work because 2, i don't know how to code it right. any help would be supah!
Reply

Tags
acrobat.dll, large file, pdf

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
CS3 Photoshop and Illustrator will not load,Acrobat, Dreamweaver will usenet Adobe Photoshop 5 07-23-2008 11:05 AM
Load Acrobat Reader via web page with javascript usenet Adobe Acrobat 1 07-21-2008 10:14 AM
waiting for page to load usenet Javascript 5 06-05-2008 01:42 PM
Who thinks adobe acrobat is a little slow to load? usenet Adobe Acrobat 1 04-20-2008 10:05 AM
>15 seconds to load Acrobat after printing to PDF usenet Adobe Acrobat 11 01-20-2007 05:40 PM


All times are GMT -5. The time now is 01:03 AM.

Managed by Infnx Pvt Ltd.