Previous | Next | (P-PDF) Acrobat 6.0
Topic: Viewing in 6.0
Conf: (P-PDF) Acrobat 6.0, Msg: 110436
Date: 4/27/2004 11:39 PM
I was very displeased with the options of viewing a PDF from within VB.net so with the help of the examples I wrote my own viewer.
This worked great in 5.0. However we did recently upgrade to 6.0 and now I have a small issue.
I am using OpenInWindowEx. The document still views but I am unable to get the scroll bars to show up automatically unless I use the AV_EXTERNAL_VIEW parameter and use the right click menu to show the window.
In 5.0 using AV_DOC_VIEW worked great and even now on 6.0 the examples from VB 6.0 work properly. It's just not working properly in .net. Any help would be welcome.
Public Sub LoadMe(ByVal v_Filename As String)
Dim ok As Integer
Dim WhereAMI As String
AcroExchAVDoc = CreateObject("AcroExch.AVDoc")
WhereAMI = "loaded AcroExchAVDoc "
ok = AcroExchAVDoc.OpenInWindowEx(v_Filename, Me.Handle.ToInt32, AV_DOC_VIEW, True, 0, PDFullScreen, AVZoomFitWidth, 0, 0, 0)
'ok = AcroExchAVDoc.OpenInWindowEx(PDFOUTDirectory & v_Filename, Me.Handle.ToInt32, AV_DOC_VIEW, True, 0, PDFullScreen, AVZoomFitWidth, 0, 0, 0)
WhereAMI = "put in window AcroExchAVDoc"
If Not ok Then
MsgBox("Can't open file: " + v_Filename)
Catch ex As Exception
MsgBox(WhereAMI & " " & ex.Message)
Public Const AV_EXTERNAL_VIEW = 1 ' Open the document with tool bar visible
Public Const AV_DOC_VIEW = 2 ' Draw the page pane and scrollbars
Public Const AV_PAGE_VIEW = 4 ' Draw only the page pane