943,836 Members | Top Members by Rank

Ad:
Mar 6th, 2009
0

Opening PDF file in VB6 Form

Expand 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.
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Mar 6th, 2009
0

Re: Opening PDF file in VB6 Form

Click to Expand / Collapse  Quote originally posted by RahulV ...
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.
Reputation Points: 15
Solved Threads: 2
Newbie Poster
SlyMaelstrom is offline Offline
21 posts
since Oct 2005
Mar 7th, 2009
0

Re: Opening PDF file in VB6 Form

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.
Reputation Points: 40
Solved Threads: 24
Junior Poster
SCBWV is offline Offline
125 posts
since Apr 2007
Mar 7th, 2009
0

Re: Opening PDF file in VB6 Form

Click to Expand / Collapse  Quote originally posted by SCBWV ...
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.
Reputation Points: 15
Solved Threads: 2
Newbie Poster
SlyMaelstrom is offline Offline
21 posts
since Oct 2005
Mar 8th, 2009
0

Re: Opening PDF file in VB6 Form

Click to Expand / Collapse  Quote originally posted by SCBWV ...
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.
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Mar 8th, 2009
0

Re: Opening PDF file in VB6 Form

Click to Expand / Collapse  Quote originally posted by RahulV ...
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.
Reputation Points: 15
Solved Threads: 2
Newbie Poster
SlyMaelstrom is offline Offline
21 posts
since Oct 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: help
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Total control in one form.....





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC