Results 1 to 12 of 12

Thread: [RESOLVED] pdf view

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Resolved [RESOLVED] pdf view

    Hi

    i 'm developing windows application
    using these code to view pdf

    Code:
      Dim pdfurl As String = app.path &"\pdf\help.pdf" 
                Objpdf.AxPdf1.src = pdfurl
    its viewing in my system.

    when i genarate the exe and installed in another system ,its not working.

    Added "Acrobat Control for ActiveX" in References.

    in my sys Adobe 5.0 is there,another sys have 8.0

    any problem with version?

    Thanks for any help.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: pdf view

    I'm not sure whether the version would be an issue but it may well be. The first thing to check though is that you have deployed the Interop DLL with your EXE. If not then it can;t work with any version.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    yes i deployed Interop.PdfLib.dll and AxInterop.PdfLib.dll .

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: pdf view

    Then I guess it's a version issue. I've not used COM Interop all that much but I know that version matters with Microsoft Office so I guess it likely does with any COM components.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    any other way to viewpdf?

  6. #6

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    the pdf.ocx control is only version 5.05. I checked in the ActiveX directory of another sys Adobe\Acrobat 8.0 installation and there was no pdf.ocx .

    Also on Adobe's Web site, all their info. on pdf.ocx only mentions the 5.05 version.

    Is there a better way to display PDF files other than the pdf.ocx ActiveX control?

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: pdf view

    I have Adobe Reader installed on my system and when I choose items for the Toolbox, the first item on the COM Components page is "Adobe PDF Reader" in AcroPDF.dll named "Adobe Acrobat 7.0 Browser Control Type Library 1.0". I think that that's probably what you should using. Note that I have the most recent version of Adobe Reader installed, i.e. 9.2, but that name indicates that they've been using the same ActiveX control since version 7.0, so that should provide fairly widespread support. Anyone using older than version 7 doesn't deserve to use your app anyway.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    Thanks for ur reply

    For my application,
    I just open Choose Tool Box Items dialog by right clicking on toolbox and select COM components tab.
    then select adobe acrobat reader 7.0 browser document

    I already install adobe acrobat reader 8.0 in my system..

    after selection i just click ok .now axAcroPDF1 is added into tool box.
    AxAcroPDF1.src = "E://ast/pdf/help.pdf"

    i'm unable to open pdf,when i add breakpoint there the path coming like
    "file://E://ast/pdf/help.pdf"

    what is the problem?

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: pdf view

    That doesn't look like a valid file path to me.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  10. #10

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    Yes its not valid path.

    Why its coming like?

  11. #11
    Fanatic Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Location
    Kyrksæterøra, Norway
    Posts
    518

    Re: pdf view

    AxAcroPDF1.src = "E:\ast\pdf\help.pdf"
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

  12. #12

    Thread Starter
    Member
    Join Date
    Oct 2009
    Posts
    32

    Re: pdf view

    Thank you jmcilhinney,Its working now

    Thanks alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width