Planet PDF Forum Archive

Planet PDF ForumThis is from our 160,000 page PDF discussion forum archive one & two spanning 1999-2011. Use the filters on our Advanced Search page to search archive only. Head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions.


Previous | Next | (P-PDF) Acrobat 6.0


Topic: Viewing in 6.0
Conf: (P-PDF) Acrobat 6.0, Msg: 110436
From: JasonBJones
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

Try

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
AcroExchAVDoc.Close(0)
MsgBox("Can't open file: " + v_Filename)
Exit Sub
End If

Me.ShowDialog()

AcroExchAVDoc.Close(0)

Dispose(True)

Catch ex As Exception

MsgBox(WhereAMI & " " & ex.Message)

End Try

End Sub

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


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist 11

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Two Passwords Are Better Than One: The Low-Down On PDF Security

For people who don't spend their time looking at PDF files in text editors*, PDF security is a sometimes misunderstood beast.

For example, those document restrictions that PDF files sometimes have -- no Printing, Content Copying, Page Extraction, etc -- are essentially useless unless the PDF also has a User Password.

January 09, 2014
Platinum Sponsor



Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist 11

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.