Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > cannot open pdf files in windows application using vb .net 2008
 

cannot open pdf files in windows application using vb .net 2008

hi friends..

how to view pdf files in windows applications using vb .net 2008.?
i need a sample code and step by step procedure...
anyone help me...
RRajasekar  Saturday, March 07, 2009 1:08 PM

Hi RRajasekar,

If you want to read PDF file content, you need to use Adobe component in your winform application. If you have installed Adobe PDF reader, you can find components in COM page in Visual Studio.

Microsoft hasn't tested these components and got special documents from Adobe of their usage. So you may try to contact Adobe company for help. Thank you for your understanding.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, March 10, 2009 7:03 AM

Hi RRajasekar,

If you want to read PDF file content, you need to use Adobe component in your winform application. If you have installed Adobe PDF reader, you can find components in COM page in Visual Studio.

Microsoft hasn't tested these components and got special documents from Adobe of their usage. So you may try to contact Adobe company for help. Thank you for your understanding.

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, March 10, 2009 7:03 AM
You can also view a PDF in VS2008 using a web browser control.

For instance, if your web browser control is wbDocument then to load a file
wbDocument.Navigate(FileName)

The following I picked up recently (I completely forgotten who I got this from to give them credit)

#Region " Required for view completion "
    ''' <summary>
    ''' This code helps to insure that the PDF document is completely released.
    ''' If these steps aren't taken the PDF file may be locked for some time or
    ''' even until this application is exited.
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub DemoViewer_FormClosing() Handles Me.FormClosing
        If FileName.Length > 0 Then
            wbDocument.Hide()
            wbDocument.Navigate("about:blank")
            Do Until wbDocument.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
                System.Threading.Thread.Sleep(100)
            Loop
            wbDocument.Dispose()
            System.Threading.Thread.Sleep(100)
        End If
    End Sub
#End Region

KSG
Kevininstructor  Wednesday, April 22, 2009 9:29 PM

You can use google to search for other answers

Custom Search

More Threads

• DCOM Server Process Launcher SP3 5512
• I download a TaskVision Source File,but I connot find the web service source part or the db definition part
• Need Help
• No Animals teleport to my machine.
• Windows service databse problem
• linking two forms in C#
• Hosted Web Site Login Manager
• Screensaver mode
• Changing readonly property of all textboxes on form
• TaskPane Problem!!!