Display Adobe pdf inside a div

前端 未结 9 729
南旧
南旧 2020-12-01 04:59

I have a pdf file that the user has to see and click on the \"I agree\" button. How do you display a pdf inside a div?

相关标签:
9条回答
  • 2020-12-01 05:52

    We use this on our website

    http://issuu.com/smartlook

    Its a very customizable to display PDF's directly in your browser. It basically hosts the PDF in a flash object if you are not opposed to that sort of thing.

    Here is a sample from our corporate website.

    0 讨论(0)
  • 2020-12-01 05:53

    may be you can do by using AJAX or jquery...
    just send that file url on one page and then open like normally open pdf file in that page and use ajax.

    1)so as soon as user will click on the button. then u call that function in which u above tast. So by this way there will be only one page and by that you can show as many pdf without refreshing page.

    2) if u don't have many pdf and if u don't know then just upload that file on google docs and then just put the share link file....and then just use ajax or jquery.

    i prefer jquery if u don't have use AJAX.

    0 讨论(0)
  • 2020-12-01 05:58

    You cannot, and here is the simple answer.

    Every media asset poured into the browser is identified by a mime type name. A browser then makes processing determinations upon that mime type name. If it is image/gif or image/jpeg the browser processes the asset as an image. If it is text/css or text/javascript it is processed as a code asset unless the asset is addressed independent of HTML. PDF is identified as application/pdf. When browsers see application/pdf they immediately switch processing to a plugin software capable of processing that media type. If you attempt to push media of type application/pdf into a div the browser will likely throw an error to the user. Typically files of type application/pdf are linked to directly so that the processing software an intercept the request and process the media independent of the browser.

    0 讨论(0)
提交回复
热议问题