I have referenced different answers here but its not working as i feel they are outdated in this site.
<div class="grid-container" id="resumepart">
<div class="grid-item1">
<section class="section">
<h1><?php echo $row['res_fname'];?><br><?php echo $row['res_lname'];?></h1><br>
<span class="smallspace"><?php echo $row['res_profession'];?></span>
<div class="banner topspace">About Me</div>
<div class="botspace">
<p><?php echo $row['res_aboutme'];?></p>
</div>
<div class="banner">Personal Info</div>
<div class="spacetop">
<p class="bold">Email</p>
<p><?php echo $row['res_email'];?></p>
</div>
<div class="spacetop">
<p class="bold">Phone</p>
<p><?php echo $row['res_phone'];?></p>
</div>
<div class="spacetop">
<p class="bold">Country</p>
<p><?php echo $row['res_country'];?></p>
</div>
<div class="spacetop">
<p class="bold">City</p>
<p><?php echo $row['res_city'];?></p>
</div>
</section>
</div>
</div>
<div class="buttons" id="buttons">
<button class="button-9" onclick="downloadPDF()">Download</button>
<button class="button-9" onclick="window.print()">Print</button>
</div>
on clicking Download button, the div with ID 'resumepart' should only be saved as PDF. I am new to using Javascript and PDF conversion. Thanks in Advance!