Sir
Using Visual Foxpro 6.0, I need PDF information to be displayed on form using Messagebox. I wrote a code which is working very fine and giving me all information but the problem is that I used three classes instead of one. Can this be done using single class????????. The code is
*code starts from here
CLEAR
SET DEFAULT TO C:\<br />pdf_name="C:\SS.PDF"
oFsO = CREATEOBJECT("Scripting.FileSystemObject")
oFile = oFsO.GetFile(PDF_NAME)
oPdDoc = CREATEOBJECT("AcroExch.PdDoc")
oPdDoc.Open(PDF_NAME)
AVDoc = CreateObject("AcroExch.AVDoc")
AVDoc.Open(pdf_name,"")
PDDoc = AVDoc.GetPDDoc
pdf_title=PDDoc.GETInfo("Title")
pdf_author=PDDoc.GETInfo("Author")
pdf_key=PDDoc.GETInfo("Keywords")
messagebox("Pdf Name : "+oFile.Name+chr(13)+;
"PDF Title : "+pdf_title+chr(13)+;
"PDF Author : "+pdf_author+chr(13)+;
"PDF keywords : "+pdf_key+chr(13)+;
"Date Created : "+dtoc(ttod(oFile.DateCreated))+chr(13)+;
"Date Accessed : "+dtoc(ttod(oFile.DateLastAccessed))+chr(13)+;
"Date Modified : "+dtoc(ttod(oFile.DateLastModified))+chr(13)+;
"Size : "+str(oFile.SIZE())+chr(13)+;
"Number of Pages : "+str(oPdDoc.GetNumPages))
RELEASE oFsO
RELEASE oPdDoc
RELEASE AVDOC
*code ends here
to test this code just replace the ss.pdf with any other Acrobat file .
When I run this program its takes few seconds to display required information. factually I have to integrate this code into form.
thnx
Rahul
rahulmahajans@rediffmail.com