Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: rahul mahajans
  Where is rahul mahajans?
 delhi
 India
 rahul mahajans
 Tags
Subject: Pdf Information on VFP Form
Thread ID: 22617 Message ID: 22617 # Views: 8 # Ratings: 0
Version: Visual FoxPro 6 Category: Classes and Objects
Date: Wednesday, April 23, 2003 8:06:25 AM         
   


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

COMPLETE THREAD

Pdf Information on VFP Form Posted by rahul mahajans @ 4/23/2003 8:06:25 AM
RE: Pdf Information on VFP Form Posted by Craig Moore @ 4/23/2003 11:11:31 AM
RE: Pdf Information on VFP Form Posted by rahul mahajans @ 4/23/2003 12:00:00 PM
RE: Pdf Information on VFP Form Posted by Craig Moore @ 4/23/2003 12:35:52 PM
RE: Pdf Information on VFP Form Posted by rahul mahajans @ 4/23/2003 1:22:32 PM