Best way for embedding PDF into HTML

1146435 pts.
Tags:
HTML
PDF
Does anyone know the best way to embed a PDF into HTML? I usually create my PDFs very fast so I can't have a third-party solution. Would iFrame work? Thanks!
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes, an iFrame would work:

<iframe id="iframepdf" src="files/your_file.pdf"></iframe>

But it might be better to do it with an object:

<object data="your/pdf/url" type="application/pdf">
  <embed src="your/pdf/url" type="application/pdf" />
</object>

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Depending on your site and the bandwith available, you could just  provide links to the PDF and let the end-user open the document. Do you want to force load it by default?
    133,790 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: