What are the best practices for allowing users to view PDF files in Adobe or Preview directly from a website?

When allowing users to view PDF files directly from a website, it is best practice to use a combination of HTML and PHP to ensure a secure and user-friendly experience. One way to achieve this is by using the `header()` function in PHP to set the content type to `application/pdf` and then output the PDF file using `readfile()`.

<?php
// Path to the PDF file
$pdf_file = 'path/to/your/pdf/file.pdf';

// Set the content type to PDF
header('Content-Type: application/pdf');

// Output the PDF file
readfile($pdf_file);