If you just want to output some content directly (without a view page), you should write your whole content to the response, not the just the $id.
If you want to use HTML content in a custom file (with a view page), you should use Custom File with Include Common Files enabled. To get a route value in the custom file you may use global function, e.g. Route("id").
Note that the argument of Route() is the argument name you defined in your route (i.e. "id" in your case), not the arbitrary variable name (e.g. $par_id) you use later.
Also, Route_Action server event and Custom File are two different approaches, they are not used as a combination. If you use Custom File, you should set your route as the Path (see the notes for details), not by server event.
So what will I do if I want to send parameter in my custom file (print_pf.php) and access or display the paramter in the custom files? Please give me sample. I do not much understand the documentation.