generate hallticket changes

This commit is contained in:
gayathri1990 2018-08-25 14:14:38 +05:30
parent 45c93508e1
commit 446f7c7ebf
2 changed files with 43 additions and 14 deletions

View File

@ -1023,4 +1023,38 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun
$modalInstance.dismiss('cancel');
};
$scope.generatePDF = function(){
var innerContents = document.getElementById("university_header").innerHTML;
var popupWinindow = window.open('', '_blank', 'width=1200,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
popupWinindow.document.open();
popupWinindow.document.write('<html>');
popupWinindow.document.write('<style type="text/css" media="print">');
popupWinindow.document.write('@page { size: portrait; }');
//popupWinindow.document.write('.title{border:3px solid black;}');
popupWinindow.document.write('</style>');
popupWinindow.document.write(innerContents);
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
//popupWinindow.document.write(innerContents);
popupWinindow.document.write('</html>');
popupWinindow.document.close();
popupWinindow.focus();
popupWinindow.print();
popupWinindow.close();
}
}]);

View File

@ -1,15 +1,16 @@
<style>
<!--<style>
.table{
border: 1px solid #000 !important;
}
</style>
</style> -->
<div class="container-fluid container-fullw bg-white" style="width: 786px;" ng-controller="generateHallTicketCtrl">
<div align="right">
<button class="btn btn-success btn-sm" ng-click="printStudentDetails(semDataTypePDF);">Print</button>
<button class="btn btn-success btn-sm" ng-click="generatePDF();">Print</button>
<!--<button class="btn btn-success" id="print"ng-click="generatePDF();">Printer</button></div>-->
</div>
@ -30,9 +31,7 @@
</tbody>
</table>
</div>
<div id="student_header">
<table width="100%" border="1" id = "" style="background-color:#fff;">
<tbody>
<tr>
@ -40,15 +39,11 @@
</tr>
<tr>
<td><strong style="font-size:14px;" >Enrollment No</strong>&nbsp;:&nbsp;&nbsp;&nbsp;{{studentObj.EnrollmentID}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong style="font-size:14px;" >Student Name</strong>&nbsp;&nbsp;:&nbsp;&nbsp;{{studentObj.Firstname}}&nbsp;{{studentObj.Lastname}}</br><strong style="font-size:14px;" >Center Name</strong>&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;{{centerNamePDF}}</td>
<td><strong style="font-size:14px;" >Enrollment No</strong>&nbsp;:&nbsp;&nbsp;&nbsp;{{studentObj.EnrollmentID}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong style="font-size:14px;" >Student Name</strong>&nbsp;&nbsp;:&nbsp;&nbsp;{{studentObj.Firstname}}&nbsp;{{studentObj.Lastname}}<br></br><strong style="font-size:14px;" >Center Name</strong>&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;{{centerNamePDF}}</td>
</tr>
<!-- <tr> -->
<!-- <td >{{universityAddressPDF}}</td> -->
<!-- </tr> -->
</tbody>
</table>
</div>
</table>
<!-- FOR SEMESTER TYPE STUDENTS-->
<table width="100%" border="1" ng-repeat ="subjects in studentObj.FeeDetails" and ng-if="semDataTypePDF == 'SEM'" id = "{{studentObj.StudentID}}{{$index}}">
@ -155,8 +150,8 @@
</tr>
</tbody>
</table>
</div>
</table>
</div>
</div>