Opening PDF file in VB6 Form

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 68
Reputation: RahulV is an unknown quantity at this point 
Solved Threads: 0
RahulV's Avatar
RahulV RahulV is offline Offline
Junior Poster in Training

Opening PDF file in VB6 Form

 
0
  #1
Mar 6th, 2009
Hi,
How can i open a PDF file in Form instead of using a shell to open it?
Also i want to select some text in the opened PDF file and store it in a variable.

Thank you.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 21
Reputation: SlyMaelstrom is an unknown quantity at this point 
Solved Threads: 2
SlyMaelstrom's Avatar
SlyMaelstrom SlyMaelstrom is offline Offline
Newbie Poster

Re: Opening PDF file in VB6 Form

 
0
  #2
Mar 6th, 2009
Originally Posted by RahulV View Post
Hi,
How can i open a PDF file in Form instead of using a shell to open it?
Also i want to select some text in the opened PDF file and store it in a variable.

Thank you.
Adobe provides documentation on how to do this using their API and a javascript object. You need Acrobat professional on your computer to perform certain operations. As far as reading, I'm sure there is a way to do this with just adobe reader.

http://www.adobe.com/devnet/acrobat/...JavaScript.pdf
www.adobe.com/devnet/acrobat/pdfs/AcroJS.pdf
Last edited by SlyMaelstrom; Mar 6th, 2009 at 5:22 pm.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 102
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 14
SCBWV SCBWV is offline Offline
Junior Poster

Re: Opening PDF file in VB6 Form

 
0
  #3
Mar 7th, 2009
Probably the easiest way to do what you want is to use a Browser control on your form and open the PDF file in the browser - Browser1.Navigate PDFFile$ - works like a charm and you're not tied to a particular version of Acrobat Reader.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 21
Reputation: SlyMaelstrom is an unknown quantity at this point 
Solved Threads: 2
SlyMaelstrom's Avatar
SlyMaelstrom SlyMaelstrom is offline Offline
Newbie Poster

Re: Opening PDF file in VB6 Form

 
0
  #4
Mar 7th, 2009
Originally Posted by SCBWV View Post
Probably the easiest way to do what you want is to use a Browser control on your form and open the PDF file in the browser - Browser1.Navigate PDFFile$ - works like a charm and you're not tied to a particular version of Acrobat Reader.
He said he wants to select some text and store it into a variable. I assume he means he wants it open to be able to read the data with the code.

To the OP, another point I forgot to make. Text in a PDF might not be text at all. It can also be an image, while Adobe Professional does have OCR recognition, it is not made available by them in their API. You can however extract the image and use an OCR that Office gives you in their library references. I forgot the name of it, but it should be easy enough to Google.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 68
Reputation: RahulV is an unknown quantity at this point 
Solved Threads: 0
RahulV's Avatar
RahulV RahulV is offline Offline
Junior Poster in Training

Re: Opening PDF file in VB6 Form

 
0
  #5
Mar 8th, 2009
Originally Posted by SCBWV View Post
Probably the easiest way to do what you want is to use a Browser control on your form and open the PDF file in the browser - Browser1.Navigate PDFFile$ - works like a charm and you're not tied to a particular version of Acrobat Reader.
Thanks that helped in selecting the required text.
But still im not able to put it in a variable or access the text via code.

You know how to do that?
Last edited by RahulV; Mar 8th, 2009 at 8:57 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 21
Reputation: SlyMaelstrom is an unknown quantity at this point 
Solved Threads: 2
SlyMaelstrom's Avatar
SlyMaelstrom SlyMaelstrom is offline Offline
Newbie Poster

Re: Opening PDF file in VB6 Form

 
0
  #6
Mar 8th, 2009
Originally Posted by RahulV View Post
You know how to do that?
You can't in any way other than the documentation that I provided. This is Adobe's documentation telling you how to access the data. Now... if you want to open it in a web browser object, then you can, you just have to perform your javascript on the browser object rather than an object you defined.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC