Since you are generating the page using PHP, I suggest you look at a pdf generator library such as FPDF or DOMPDF. These allow you to generate a pdf file using PHP in much the same way that you generate HTML.
One way to implement this would be to add a query string to the url to specify the output format. E.g:
HTML – http://example.com/articles/article.php
PDF – http://example.com/articles/article.php?output=pdf
This way you merely need <a href="?output=pdf">View as PDF</a> on your page to download the pdf.