You can't make sure: it ultimately depends upon the user's software. Often, browsers will open PDFs inline, but this is only if the user has installed a PDF viewer and associated it with the PDF MIME-type, allowing the browser to embed that application and open the file with it.
If the user does not have PDF viewer software associated with the PDF MIME-type and embedable with their browser, the browser will not know what to do with the PDF and will thus prompt the user to download it. If you're certain the browser you're testing on can read PDF files, you may want to make sure your server is serving the PDF file with the correct MIME-type: application/pdf
.
If you want to make sure the user views the contents of the PDF on your site, you may want to use a Javascript or Flash library (although in the case of Flash, you are expecting the user to have the Flash plugin installed instead) to parse the PDF and render it inline. The Mozilla PDF.js project may be useful if you go down this route; otherwise you may want to try FlexPaper for Flash.