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 :: offline p5.js html 
Html :: html special characters 
Html :: html = sign 
Html :: html online editor 
Html :: bootstrap upload image plugin for html 
Html :: h5 in html 
Html :: div class link 
Html :: klaviyo properties 
Html :: Bootstrap Text Colors Example 
Html :: html make card 
Html :: Combining <symbol with <use SVG tags on a HTML page 
Html :: vue paragraph not showing when class applied to it 
Html :: href open in new tab 
Html :: html prime number program 
Html :: html render div 
Html :: Text with colour bold 
Html :: vertical tabs bootstrap 
Html :: collapse boostrap 
Html :: twig markdown html 
Html :: card decks bootstrap 4.5 
Html :: yaml multiline string 
Html :: how to do anchor in jupyter notebook markdown 
Html :: html input on enter 
Html :: input group 
Html :: html autocomplete 
Html :: tailwind css breadcrumbs 
Html :: html add line break in string on screen size 
Html :: all meta og tags 
Html :: qr code sccanner 
Html :: petition to get rid of pigeons 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =