Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html to pdf jquery

var pdf = new jsPDF('p', 'pt', 'a4');
pdf.addHTML($("#sectionId").get(0), 15, 15, options, function () {
  pdf.save('@(Html.Raw("textdoc.pdf")'));
  return true;
});
Comment

html table to pdf jquery

<body>

	<div id="printThis">
		<div class="container">
			<br><br>
			<center>lorem</center>
			<center>
				<table>
					<tr>
						<th>Id</th>
						<th>Name</th>
						<th>someth</th>
						<th>woring</th>
					</tr>
					<tr>
						<td>1</td>
						<td>jerry</td>
						<td>Account</td>
						<td>berlin</td>
					</tr>
					<tr>
						<td>1</td>
						<td>jerry</td>
						<td>Account</td>
						<td>berlin</td>
					</tr>
				</table>
			</center>
		</div>
	</div>

<center>
	<input type="submit" value="Print" id="PrintBtn"  name="">
</center>
    <script>
    
     $('#printBtn').click(function () {
            var openWindow = window.open("", "", "_blank");
            openWindow.document.write($('#printThis').parent().html());
            openWindow.document.write('<style>' + $('style').html() + '</style>');
            openWindow.document.close();
            openWindow.focus();
            openWindow.print();
            // openWindow.close();
            setTimeout(function () {
                openWindow.close();
            }, 1000)

        })
    </script>

</body>
Comment

PREVIOUS NEXT
Code Example
Html :: style attribute in html 
Html :: underline text html 
Html :: html title tag 
Html :: fieldset margin 
Html :: confirmed button bootstrap 
Html :: ean 13 barcode in javascript tutorial 
Html :: background color change 
Html :: nunjucks loop n times 
Html :: dropzone 
Html :: include jquery if not included 
Html :: twig column 
Html :: form mvc async 
Html :: How to make the scratch card by using HTML 
Html :: a page with html cheat sheet 
Html :: twig first last element 
Html :: add ruby title html erb icon 
Html :: Country-Region Dropdown Bootstrap 
Html :: handlebar js basic example 
Html :: how to add an email box in html 
Html :: nav-pills class bootstrap 
Html :: btn-default class in bootstrap 4 
Html :: starter bootstrap 
Html :: innerhtml is not a function 
Html :: how to add html in svg d3 
Html :: How to find the immediate parent in xpath 
Html :: npm html-pdf 
Html :: popper js example 
Html :: qr code sccanner 
Html :: <span class="notification-count"0</span 
Html :: pass dynamic id in src url 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =