Avatar of ceMo89
ceMo89
 asked on

VB.NET View PDF file in windows form

Hey experts,
how it is possible to view a PDF file in a windows form (without opening the acrobat reader)...just view it on my windows form in my vb.net application??

Thanks
Visual Basic.NET

Avatar of undefined
Last Comment
Éric Moreau

8/22/2022 - Mon
Cem Türk

try navigating to path of pdf file wiht webbrowser control.
ceMo89

ASKER
hey cem,
i've tried it already...

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim sPath As String = "C:\File.pdf"
        WebBrowser1.Navigate(sPath)
    End Sub
End Class

but it will open the adobe acrobat reader....any idea??
Éric Moreau

>>but it will open the adobe acrobat reader....any idea??

but it opens into the browser not as an external window.

The PDF is a format that needs to be interpreted in order to be displayed. The browser is using an external process (Acrobat Reader in this case) to display the documents.

Unless you find a control that can render a PDF file by itself, the reader will always be required.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ceMo89

ASKER
No it opens as an external windows...ok the reader will always be requirded...is theire not any API available or something else??? i will view the pdf file in my application .... for example if i havent installed the acrobat reader...

ceMo
ASKER CERTIFIED SOLUTION
Éric Moreau

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.