<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="/js/tinymce/skins/ui/oxide/content.min.css">
		<link type="text/css" rel="stylesheet" href="/js/tinymce/skins/content/default/content.css">
		<link th:href="@{/css/bootstrap/bootstrap.min.css}" rel="stylesheet">
		<link th:href="@{/css/fa/all.css}" rel="stylesheet">
		<style type="text/css">
			body{
				font-size: 10pt;
				size: 21cm 29.7cm;
			    margin: 30mm 45mm 30mm 45mm;
			}
			
			@page {
			    size: 21cm 29.7cm;
			    margin: 30mm 45mm 30mm 45mm;
			}
		
		</style>
		<script src="https://cdnjs.cloudflare.com/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>

		
	</head> 
	<body id="tinymce" class="mce-content-body mceNonEditable" style="padding:unset; margin:unset; margin-top:50px;">
	
		<span class="btn btn-primary" style="float:right;border-radius:50%;cursor:pointer;margin-right:50px;" onclick="print_to_pdf();"><i class="fa fa-print"></i></span>
		<section style="border:1px dotted gray;max-width:1000px;margin:auto;padding:25px;">
			<section id="content" th:utext="${content}" ></section>
		</section>
	
		<script>
			var opts = { margin: [20, 12, 20, 12] };
			var worker = html2pdf();
			worker.set(opts);
			
			function print_to_pdf(){
				const element = document.getElementById('content');
				worker.from(element).save();
			}
		</script>
	</body>
</html>


