Link to home
Create AccountLog in
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
Avatar of Cem Türk
Cem Türk
Flag of Türkiye image

try navigating to path of pdf file wiht webbrowser control.
Avatar of ceMo89
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??
Avatar of É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.
Avatar of 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
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account