PDF Embedding in Web without all the extra button

Posted on 2006-04-14
Last Modified: 2010-04-09

We are embedding a pdf  in a html it looks fine. But we dont want all the buttons displayed on there (except print and save).

Also, is there any way we can print from outside the pdf , the pdf .

Any help is greatly appreciated.

Question by:eplanetsystems
    LVL 28

    Accepted Solution

    You should do the opposite, as stated here

    "Because users frequently close document windows, the best guidelines for linking to non-Web documents are:

    1) Open non-Web documents in a new browser window.
    2) Warn users in advance that a new window will appear.
    3) Remove the browser chrome (such as the Back button) from the new window.
    4) Best of all, prevent the browser from opening the document in the first place. Instead offer users the choice to save the file on their harddisk or to open it in its native application (Adobe Reader for PDF, PowerPoint for slides, etc.). Unfortunately, doing so requires a bit of technical trickery: you have to add an extra HTTP header to the transmission of the offending file. The header line to be added is "Content-disposition: Attachment". If possible, also add "; filename=somefile.pdf" at the end of this line, to give the browser an explicit filename if the user chooses to save the file. (I thank Sybren Stüvel for providing this code.)

    All these guidelines stem from the same underlying phenomenon: the non-Web documents are native PC formats. These formats have their own applications, each of which gives users a set of commands and navigation options that are completely different than the ones for browsing websites. "

    LVL 12

    Expert Comment

    Gamebits is rad!  Quite consise :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Introduction This warning has to be one of the most commonly issued warnings in the history of PHP.  The article explains why this warning arises and what to do to mitigate the problem. How this Happens HTTP headers include many different kinds…
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now