How to convert a web page into PDF format using renderAs attribute

<apex:page standardController="Contact" renderAs="pdf" >
<apex:page standardController="Contact" ><apex:form ><h1 style="font-size:25px;">Converting to pdf format</h1><body><table style="width:100%"><tbody style="diasplay:table-row-group;vertical-align:middle;"><tr style="display:table-row;"><th style="font-size:1 em;text-align:left;padding-top:6px;padding-bottom:5px;padding:2px 6px 3px 7px;line-height:50px;"> Company name </th><th> Contact number </th></tr><tr><th> Micropyramid inf pvt ltd </th><th> 04065996999 </th></tr></tbody></table>
<apex:page standardController="Contact" renderAs="pdf" >

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store