We export the contents of the HTML table to a PDF document, and after clicking the button, we save the document, a finished snippet using Bootstrap.
26.02.2026 / 17:30
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" /> <link rel="stylesheet" href="https://bootstraptema.ru/snippets/information/2016/etp/shieldui-all.min.css" /> <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.1.1.min.js"></script> <script type="text/javascript" src="https://bootstraptema.ru/snippets/information/2016/etp/shieldui-all.min.js"></script> <script type="text/javascript" src="https://bootstraptema.ru/snippets/information/2016/etp/jszip.min.js"></script> <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <div class="container"> <h1 class="text-center">Export a HTML Table to PDF</h1> <div class="row"> <button id="exportButton" class="btn btn-lg btn-danger center-block"><span class="fa fa-file-pdf-o"></span> Export to PDF</button> <hr /> <div class="table-responsive"> <table id="exportTable" class="table table-bordered table-hover"> <thead> <tr> <th>Name</th> <th>All</th> <th>Url</th> </tr> </thead> <tbody> <tr> <td>VK</td> <td>1211</td> <td><a href="https://vk.com/bootstraptema" target="_blank">https://vk.com/bootstraptema</a></td> </tr> <tr> <td>Twitter</td> <td>1034</td> <td><a...