How do i open a pdf on my intranet using URL & vb.net? I tried the simple code below.
avDoc = CreateObject("AcroExch.AVDoc")
pathString = "http://www.kvmart.loca/Download/Files/test.pdf"
bOK = avDoc.Open(pathString, "Populating Separation Data")
Unfortunately, the code works only if I hard code non-URL path such as "c:\inetpub\wwwroot\kvintranet\Download\test.pdf" What gives? The same code with URL worked fine with Acrobat 6 Professional.
1) You are in violation of the Acrobat EULA.
2) It should not work at all since the VB code runs on the server, not on the user's local system. So it would be opening Acrobat on the server, the user would never see it. It probably worked for you in 6 because you're running the server on the same machine your working on. Adobe tightened things up in Acrobat 7. Acrobat might know you're trying to open it from a server script and is refusing to do it.
If the VB is a stand alone exe, then there may be some other problem since it should work. For example, the URL looks like it may have a spelling problem, should "www.kvmart.loca", really be "www.kvmart.local"?
There is another way to get Acrobat to load an URL. Use the JSO object to call "app.launchURL()". Then use "AcroExch.App.GetActiveDoc()" function to get the newly loaded doc.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script