The 'lpr' protocol itself has no understanding of paper size, paper type, etc.
Setting such attributes is handled by whichever spooler 'lpr' directs the print request to, when that spooler generates the appropriate print stream containing the data and (printer-language dependent) control sequences.
You don't mention (or I've missed it if you did) what operating system you are invoking the 'lpr' command from.
I suspect, from the context, that it is a Windows-based system, and that you are probably sending the 'output.ps' file direct to the TCP/IP port on the printer known as 'printer_name' in the hosts file.
If this IS the case, then the media size and media source values are likely to have been set within that PostScript file; if the values are not set explicitly there, then the printer will use its power-on user-defined default settings.