Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to open a PDF in VS2005

How to open a PDF in VS2005

Scheduled Pinned Locked Moved C#
tutorialcsharpcomadobehelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Exelioindia
    wrote on last edited by
    #1

    Hi, I am developing a Windows application using C# 3.0, in that I have to open a pdf document. Using the Adobe PDF Reader com component I am able to open the PDF document, then deployed the application and created the setup. When I install the application in Win XP it's working fine, but when I install the same in Windows 7 or Vista, Adobe PDF Reader com component is throwing error as "Com Class not registered". Even thought I run that exe file as "Run as Administrator", it's throwing the same error. Any one guide me how to solve this, how to make my application to work in all Windows OS? Please suggest me. Thanks in Advance

    Know is Drop, Unknown is Ocean

    B 1 Reply Last reply
    0
    • E Exelioindia

      Hi, I am developing a Windows application using C# 3.0, in that I have to open a pdf document. Using the Adobe PDF Reader com component I am able to open the PDF document, then deployed the application and created the setup. When I install the application in Win XP it's working fine, but when I install the same in Windows 7 or Vista, Adobe PDF Reader com component is throwing error as "Com Class not registered". Even thought I run that exe file as "Run as Administrator", it's throwing the same error. Any one guide me how to solve this, how to make my application to work in all Windows OS? Please suggest me. Thanks in Advance

      Know is Drop, Unknown is Ocean

      B Offline
      B Offline
      Bernhard Hiller
      wrote on last edited by
      #2

      Do you get that error on both 32bit and 64bit versions of Win7/Vista, or on 64bit versions only? In the latter case, you could change the target of your application to x86.

      E 1 Reply Last reply
      0
      • B Bernhard Hiller

        Do you get that error on both 32bit and 64bit versions of Win7/Vista, or on 64bit versions only? In the latter case, you could change the target of your application to x86.

        E Offline
        E Offline
        Exelioindia
        wrote on last edited by
        #3

        Thanks for your response. I am getting this error message in 64bit OS. Also while deploying my application I tried by setting the Target Platform as x86, but still it's throwing the same error.

        Know is Drop, Unknown is Ocean

        P B 2 Replies Last reply
        0
        • E Exelioindia

          Thanks for your response. I am getting this error message in 64bit OS. Also while deploying my application I tried by setting the Target Platform as x86, but still it's throwing the same error.

          Know is Drop, Unknown is Ocean

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          I suspect you're hitting an issue where there's a 32 bit version of the COM component registered, but not an appropriate 64 bit compatible version. One way round this, if you don't care about your application using 64 bit features (i.e. memory), is to use corflags.exe to set the CorFlags section in the PE executable. The command you need is

          corflags exefilename.exe /32bit+

          I'm not a stalker, I just know things. Oh by the way, you're out of milk.

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Onyx

          1 Reply Last reply
          0
          • E Exelioindia

            Thanks for your response. I am getting this error message in 64bit OS. Also while deploying my application I tried by setting the Target Platform as x86, but still it's throwing the same error.

            Know is Drop, Unknown is Ocean

            B Offline
            B Offline
            Bernhard Hiller
            wrote on last edited by
            #5

            How do you create that COM class? Is the registry path hard coded in full length? How did you create the reference to the component ("COM" from the "add reference" dialog, or a PIA)? Perhaps show a few lines of code leading to the line with the error.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups