First of all, I'd recommend using a library for this because although it "might be wrong", it's probably more correct than what you or I would come up with. Second, (most of) this isn't done using headers ;)
If you REALLY want to do it yourself, the native PDF functions in PHP are found here, which libraries like FPDF (my personal favorite) use directly in their implementations.
To print a page to PDF, you'll have to render it first (create the HTML DOM and apply the CSS) which PHP does not do. You'll have to render the page first with an HTML engine like WebKit, and then return to PHP for the print operation.
Again, this should probably be done using a library, saving you headaches and debugging. Of course, this question has been asked before so there's plenty of info available.
But if you want to have a go yourself, that's the path you must walk (or crawl). Me, I'd take the bus.
UPDATE
To answer your question in the comments:
<?php header("Content-type: application/pdf;charset=UTF-8"); ?>
Putting this on the top of the page render the pdf but it's not
working generated in this way. So, can you suggest any thing for this.
That header is for an HTTP request. When the request is returned from the server, it sends a header suggesting what type of content is being returned (JSON, an image, a pdf, whatever).
In other words, that header doesn't actually make a PDF, it just tells the browser to expect a PDF. After the header, the server then sends something (hopefully, a PDF).
That's why I said your original question isn't done using headers.