This can be done using CSS3 (
https://www.w3.org/TR/css3-page/#size )
Try this (AngularJS)
index.html
---------------- <!DOCTYPE html>
<html >
<head>
<title></title>
<style type="text/css">
/* style sheet for "A4" printing */
@media print and (width: 21cm) and (height: 29.7cm) {
@page {
margin: 3cm;
}
}
/* style sheet for "letter" printing */
@media print and (width: 8.5in) and (height: 11in) {
@page {
margin: 1in;
}
}
/* A4 Landscape*/
@page {
size: A4 landscape;
margin: 10%;
}
</style>
<script src="http://code.angularjs.org/1.2.0rc1/angular.js"></script>
<script src="print.js"></script>
</head>
<body ng-app="printModule" ng-controller="printCtrl">
<div ng-init='printMe()'>
Microsoft Azure is a cloud computing platform and infrastructure created by Microsoft for building, deploying, and managing applications and services through a global network of Microsoft-managed data centers.
It provides both PaaS and IaaS services and supports many different programming languages, tools and frameworks, including both Microsoft-specific and third-party software and systems.
Azure was announced in October 2008 and released on 1 February 2010 as Windows Azure, before being renamed to Microsoft Azure on 25 March 2014.
<br/>
Virtual machines, infrastructure as a service (IaaS) allowing users to launch general-purpose Microsoft Windows and Linux virtual machines, as well as preconfigured machine images for popular software packages.
App services, platform as a service (PaaS) environment letting developers easily publish and manage Web sites.
Websites, high density hosting of websites allows developers to build sites using ASP.NET, PHP, Node.js, or Python and can be deployed using FTP, Git, Mercurial or Team Foundation Server. This feature was announced in preview form in June 2012 at the Meet Microsoft Azure event.
Customers can create websites in PHP, ASP.NET, Node.js, or Python, or select from several open source applications from a gallery to deploy. This comprises one aspect of the platform as a service (PaaS) offerings for the Microsoft Azure Platform. It was renamed to Web Apps in April 2015.
WebJobs, applications that can be deployed to a Web App to implement background processing. That can be invoked on a schedule, on demand or can run continuously. The Blob, Table and Queue services can be used to communicate between Web Apps and Web Jobs and to provide state.
</pre>
</div>
</body>
</html>
print.js
-------- angular
.module('printModule', [])
.controller('printCtrl', function ($scope) {
$scope.printMe = function(){
window.print(); }
});
--
Thanks & Regards,
RNA Team
Kasani007, if this helps please login to Mark As Answer. | Alert Moderator