How do I open a pdf inside a panel in a ASP.Net 3.5 webpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LoanB
    New Member
    • Nov 2007
    • 62

    How do I open a pdf inside a panel in a ASP.Net 3.5 webpage

    Hi Guys,

    I have a website with one master page and multiple other pages. On the page in question I have a Place holder and a panel inside that page.

    When the page opens I want a .pdf displayed inside the panel.

    The pdf file is inside a folder in the project called "documents" . The pdf is called "BeginnersGuide .pdf"

    the user simply needs to be able to read th epdf and use a scroll bar to scroll down or across.

    I am very new to web programming so any assistance would greatly be appreciated. Please ask if you require any more information.

    Thanks,

    Lóan.
    Attached Files
    Last edited by jhardman; Feb 1 '10, 06:52 AM. Reason: Moved it to the correct forum, it was originally posted in the classic ASP forum
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    PDF is a document format that requires Adobe's Reader to be installed in order to view the document.

    Typically browsers have a plugin version of Adobe's PDF reader installed so that you can view PDF files within the browser.

    The thing is that this is a plugin and it depends on the browser that your user is using.

    I'm not sure how you would do this without using an iFrame element really....iFram es always make things complicated though.

    This is how I see it working...

    You will need to have an iFrame (instead of a Placeholder) on the page where you want the PDF to be displayed. An iFrame defines an inline frame that contains another document...whic h pretty much means that it lets you have a "window" within another window. It lets you load a "web page"/document within another web page.

    You will have to specify the URL to the PDF using the iFrame's "src" attribute.

    Now the iFrame will load the PDF document from the URL that you specified...and it will display it where you have placed it in the page.

    If the user does not have an Adobe Reader plugin installed in the browser will let the user download the document to their computer. This is because the browser does not know how to handle this type of data and so it lets the user decide what to do.

    -Frinny

    Comment

    • LoanB
      New Member
      • Nov 2007
      • 62

      #3
      Hi Frinny,

      Thank you very much. That helps me a great deal. I will get working on it right way.

      Comment

      • LoanB
        New Member
        • Nov 2007
        • 62

        #4
        Hi Frinny , May I ask another question related to the above:

        I now have the iFrame and my pdf opens perfectly inside it. But now I have the problem that the menus are dropping down behind the iframe.

        The Menu is created on the Master Page. The link to my site is: http://www.loanburger.com/CapeEpic.aspx

        Any idea on how to fix this please? I read up that I need to set a z-index but I have no idea where to do that.

        Thank,

        -Loan

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Yeah, I'm not so sure about how to help you with that one.

          This question would be better asked in the HTML/CSS forum.
          I believe it will have something to do with setting the position and z-index styles of the elements.

          Re-post your question with a link to your website in the HTML/CSS and the experts there should be able to help you figure it out.

          -Frinny

          (PS I just started to do off road mountain biking last year! Looking for a better seat for next season :) )

          Comment

          • LoanB
            New Member
            • Nov 2007
            • 62

            #6
            Thanks mate.

            For a saddles - I now ride a specialized phenom sl saddle. Very comfortable.

            Enjoy.

            Comment

            Working...