With the @page directive, we can specify printer margin of the page (which is not the same as normal css margin of a html element):
<style type="text/css" media="print">
@page
{
size: auto; /* auto is the current printer page size */
margin: 0mm; /* this affects the margin in the printer settings */
}
</style>
Can these values be changed from code behind(C# Code) or javascript?
i.e set size:landscape or size:8.27in 11.69in; and change margin value from code behind(C#) or javascript or jquery.