Acrobat & WebBrowser-VBForums
Results 1 to 9 of 9

Thread: Acrobat & WebBrowser

  1. #1

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262

    Acrobat & WebBrowser

    Hello VBer's,

    Does anyone know how to navigate to a specific page in a pdf file using the webbrowser? I know how to navigate to the file, but not to a specific page.

    Here is the code for a specific file:
    VB Code:
    1. WebBrowser1.Navigate2 "C:\Whatever\whatever.pdf"

    This opens the pdf file. But what I want to do is to open it to a specific page. Any ideas?

    Thanks,
    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    scrocker@midsouth.rr.com

    Climb & Maintain FL410,
    Cleared Direct Rainr

  2. #2
    Banned plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You could try using SendKeys and send the page down key a few times ...

  3. #3
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    try using something like http:\\www.testit.com\test.pdf#page=11

    Note: It must be a web-based URL, starting with http. The file must be really on a web site, not a file sharing or fake intranet.

  4. #4

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    That code works actually, however, this will not be the final cure. I need for the PDF file to eventually reside on a CD-Rom for distribution once the project is complete. Also, the code works for the first 3 pages of the file on the server, but not for say like page 5 or page 30 of 87.

    I put a test pdf file on my server, it's the acrobat tutorial. Here is the link: http://66.155.46.96/frontpage2002tutorial.pdf#page=3. This is great for page 3, and if the pdf file is on the server, and is a whole lot more than I knew at first. However, since I started researching this, I discovered something called "Named Destinations". According to Adobe, you simply type the url and filename, then add #namedestination where "nameddestination" is the reference created in Acrobat. Well, after 5 tech support calls with varying levels of competence I am still no-where! Frustrating, and they're the ones with the attitudes, when you've paid for the software and are on a toll call.

    I was on hold while typing this, and this lady really pissed easy going me off! I'm ok now, and vindicated. Can you believe that I had to read to her a knowledge document to prove to her that I had it! Incredible. Then, after insisting from the beginning to the end that I speak with someone who was competent, I finally got some vindication, when she relinquished her pride and asked someone else who told her that there were some problems with this issue, and that a senior technician will contact me(Probably next year)! Argggghhhh! After fighting for 30 minutes on a long disance call for advanced support.

    Well, thanks for letting me vent folks. She came back and told me now to use what rms10 said to use at first. Can you imagine? Then, I asked the obvious question... "Why does your documentation say one thing and the resolution is completely opposite?" How is one to win? Here is the url to the KnowledgeBase Article http://www.adobe.com/support/techdocs/a17e.htm, can you say " Oxymoron"?

    Anyway, the latest problem is that it will not go to certain pages unless I hit the enter key twice in the url Address window. They did say they are aware of this problem. ...And, how do I get it to startup on pages that are not on a server, ie - CD-Rom or Hard Drive???

    Any help will be sincerely appreciated. Believe it or not, I'm really one of the most laid back guys in the world. Amazing.

    Thanks,
    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    scrocker@midsouth.rr.com

    Climb & Maintain FL410,
    Cleared Direct Rainr

  5. #5
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    Sal could you explain why you want to open up a pdf file in a web browsers if you plan to put it on CD? You can distribute cd's that will autoboot acrobat off the cd and will not require anyone to install the reader nor will it install itself.
    Send me your private email and I will respond with mine. Lets see if we can work this out for you.

  6. #6

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    The browser control is the only control that I knew of which would let you embed a pdf file in a vb application. I have a tab control with 3 tabs. On one of the tabs is the browser control with the pdf file opening. I basically have information from my company, an entire operating manual, which was sent to me on CD-Rom, in a pdf file. This file is probably a 1,000 pages. I really would prefer to have this in an easier format than pdf, but this is the way the info was given to me. I also want the info to fit seamlessly in my program, without the user having to open a particular file.

    There are also questions/answers, in which there are references to where you can find the related information. I want the user to click on the reference and then the related information "pop-up" in a window. This information is in that pdf file. I thought about maybe just somehow trying to grab all of the data from the pdf file and put it in a word or html document so that I could have more control of the manipulation and searching of the information. I'm not quite certain of how to accomplish that task. I bought Acrobat, and there may be a method in the help for converting the information to a .doc or .txt or .htm format. The problem with that though, is that I might loose the nice links created in Acrobat. That means I would have to create links in one of the other formats.

    There are still some limitations with Acrobat. You can't have it open up to a specific page unless the pdf file is on a server. That bites!

    I'm still brainstorming on the best apprach to dealing with the info that's living in that pdf file. Of course any ideas or suggestions are greatly appreciated.

    Thanks,
    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    scrocker@midsouth.rr.com

    Climb & Maintain FL410,
    Cleared Direct Rainr

  7. #7
    Hyperactive Member FLasH3r's Avatar
    Join Date
    Feb 2001
    Location
    Bad command or filename
    Posts
    259

    I have an idea...

    when you install acrobat on a computer, it adds the ability to view pdf files using a web browser...

    the only way i can think of doing that with a browser is to make it in an OCX file.
    I search and found pdf.ocx located on the acrobat program directory (I have acrobat 4.0, the location is "C:\program Files\Adobe\Acrobat 4.0\Reader\ActiveX")...

    try using the ocx instead of a browser... that way you don't have to make the pdf online at all (i think)...


    hope this helps!

  8. #8

  9. #9

    Thread Starter
    Hyperactive Member Sal's Avatar
    Join Date
    Mar 2000
    Posts
    262
    Hi Folks,

    Back in town...

    I will give the OCX a shot, although I think I tried that originally, and it wasn't a very flexible control.

    I'll get back with you after I get some sleep.

    Sal
    VB-6 Professional Edition (Sp3)
    www.safemall.cc
    scrocker@midsouth.rr.com

    Climb & Maintain FL410,
    Cleared Direct Rainr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.