i want to get my div content with all its css styling as pdf file but when i click on button to get pdf it show only its html content not its css styling tere are my code of js and html i do this work with jsPDF library
function Convert_Html() {
var doc = new jsPDF();
var elementHTML = $('#con').;
var specialElementHandlers = {
'#elementH': function (element, renderer) {
return true;
}
};
doc.fromHTML(elementHTML, 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
doc.save('id.pdf');
}
</script>
my html code
<div id="con">
<div class="id-card-wrapper">
<div class="id-card">
<div class="profile-row">
@*<div class="dp">
<div class="dp-arc-outer"></div>
<div class="dp-arc-inner"></div>
<img src="https://via.placeholder.com/420x420">
</div>*@
<div class="desc">
<h1>Tony Stark</h1>
<p>Strength: Ironman Suit</p>
<p>Weakness: None</p>
<p>Known as: Iron Man</p>
</div>
</div>
</div>
</div>
</div>
<div id="elementH"></div>
<button onclick="Convert_Html();">Get</button>
here i am getting problem it give only it html not all css