5 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6 <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
8 <title>TableTools example - PDF message</title>
9 <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
10 <link rel="stylesheet" type="text/css" href="../css/dataTables.tableTools.css">
11 <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
12 <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
13 <style type="text/css" class="init">
16 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
17 <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
18 <script type="text/javascript" language="javascript" src="../js/dataTables.tableTools.js"></script>
19 <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
20 <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
21 <script type="text/javascript" language="javascript" class="init">
24 $(document).ready(function() {
25 $('#example').DataTable( {
26 dom: 'T<"clear">lfrtip',
34 "sPdfOrientation": "landscape",
35 "sPdfMessage": "Your custom message would go here."
47 <body class="dt-example">
48 <div class="container">
50 <h1>TableTools example <span>PDF message</span></h1>
53 <p>This example shows how you can add a message to the saved PDF using the <code>sPdfMessage</code> parameter. It also shows that the orientation of the output PDF
54 can be changed to landscape which is useful if you have a lot of columns.</p>
57 <table id="example" class="display" cellspacing="0" width="100%">
83 <td>System Architect</td>
90 <td>Garrett Winters</td>
99 <td>Junior Technical Author</td>
100 <td>San Francisco</td>
106 <td>Cedric Kelly</td>
107 <td>Senior Javascript Developer</td>
122 <td>Brielle Williamson</td>
123 <td>Integration Specialist</td>
130 <td>Herrod Chandler</td>
131 <td>Sales Assistant</td>
132 <td>San Francisco</td>
138 <td>Rhona Davidson</td>
139 <td>Integration Specialist</td>
146 <td>Colleen Hurst</td>
147 <td>Javascript Developer</td>
148 <td>San Francisco</td>
155 <td>Software Engineer</td>
163 <td>Office Manager</td>
171 <td>Support Lead</td>
178 <td>Charde Marshall</td>
179 <td>Regional Director</td>
180 <td>San Francisco</td>
186 <td>Haley Kennedy</td>
187 <td>Senior Marketing Designer</td>
194 <td>Tatyana Fitzpatrick</td>
195 <td>Regional Director</td>
202 <td>Michael Silva</td>
203 <td>Marketing Designer</td>
211 <td>Chief Financial Officer (CFO)</td>
218 <td>Gloria Little</td>
219 <td>Systems Administrator</td>
226 <td>Bradley Greer</td>
227 <td>Software Engineer</td>
235 <td>Personnel Lead</td>
242 <td>Jenette Caldwell</td>
243 <td>Development Lead</td>
251 <td>Chief Marketing Officer (CMO)</td>
258 <td>Caesar Vance</td>
259 <td>Pre-Sales Support</td>
266 <td>Doris Wilder</td>
267 <td>Sales Assistant</td>
274 <td>Angelica Ramos</td>
275 <td>Chief Executive Officer (CEO)</td>
290 <td>Jennifer Chang</td>
291 <td>Regional Director</td>
298 <td>Brenden Wagner</td>
299 <td>Software Engineer</td>
300 <td>San Francisco</td>
307 <td>Chief Operating Officer (COO)</td>
308 <td>San Francisco</td>
315 <td>Regional Marketing</td>
322 <td>Michelle House</td>
323 <td>Integration Specialist</td>
338 <td>Prescott Bartlett</td>
339 <td>Technical Author</td>
346 <td>Gavin Cortez</td>
348 <td>San Francisco</td>
354 <td>Martena Mccray</td>
355 <td>Post-Sales support</td>
362 <td>Unity Butler</td>
363 <td>Marketing Designer</td>
364 <td>San Francisco</td>
370 <td>Howard Hatfield</td>
371 <td>Office Manager</td>
372 <td>San Francisco</td>
378 <td>Hope Fuentes</td>
380 <td>San Francisco</td>
386 <td>Vivian Harrell</td>
387 <td>Financial Controller</td>
388 <td>San Francisco</td>
394 <td>Timothy Mooney</td>
395 <td>Office Manager</td>
402 <td>Jackson Bradshaw</td>
410 <td>Olivia Liang</td>
411 <td>Support Engineer</td>
419 <td>Software Engineer</td>
426 <td>Sakura Yamamoto</td>
427 <td>Support Engineer</td>
442 <td>Finn Camacho</td>
443 <td>Support Engineer</td>
444 <td>San Francisco</td>
450 <td>Serge Baldwin</td>
451 <td>Data Coordinator</td>
458 <td>Zenaida Frank</td>
459 <td>Software Engineer</td>
466 <td>Zorita Serrano</td>
467 <td>Software Engineer</td>
468 <td>San Francisco</td>
474 <td>Jennifer Acosta</td>
475 <td>Junior Javascript Developer</td>
482 <td>Cara Stevens</td>
483 <td>Sales Assistant</td>
490 <td>Hermione Butler</td>
491 <td>Regional Director</td>
499 <td>Systems Administrator</td>
506 <td>Jonas Alexander</td>
508 <td>San Francisco</td>
515 <td>Regional Director</td>
522 <td>Michael Bruce</td>
523 <td>Javascript Developer</td>
530 <td>Donna Snider</td>
531 <td>Customer Support</td>
541 <li class="active">Javascript</li>
545 <li>Server-side script</li>
550 <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
551 $('#example').DataTable( {
552 dom: 'T<"clear">lfrtip',
554 "aButtons": [
559 "sExtends": "pdf",
560 "sPdfOrientation": "landscape",
561 "sPdfMessage": "Your custom message would go here."
569 <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
572 <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
573 <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
574 <li><a href="../js/dataTables.tableTools.js">../js/dataTables.tableTools.js</a></li>
579 <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
584 <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
585 additional CSS used is shown below:</p><code class="multiline language-css"></code>
588 <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
591 <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
592 <li><a href="../css/dataTables.tableTools.css">../css/dataTables.tableTools.css</a></li>
597 <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
602 <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
603 processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
604 documentation</a>.</p>
612 <div class="gradient"></div>
615 <h2>Other examples</h2>
618 <div class="toc-group">
619 <h3><a href="./index.html">Examples</a></h3>
620 <ul class="toc active">
621 <li><a href="./simple.html">Basic initialisation</a></li>
622 <li><a href="./swf_path.html">Setting the SWF path</a></li>
623 <li><a href="./new_init.html">Initialisation with `new`</a></li>
624 <li><a href="./defaults.html">Defaults</a></li>
625 <li><a href="./select_single.html">Row selection - single row select</a></li>
626 <li><a href="./select_multi.html">Row selection - multi-row select</a></li>
627 <li><a href="./select_os.html">Row selection - operating system style</a></li>
628 <li><a href="./select_column.html">Row selection - row selector on specific cells</a></li>
629 <li><a href="./multiple_tables.html">Multiple tables</a></li>
630 <li><a href="./multi_instance.html">Multiple toolbars</a></li>
631 <li><a href="./collection.html">Button collections</a></li>
632 <li><a href="./plug-in.html">Plug-in button types</a></li>
633 <li><a href="./button_text.html">Custom button text</a></li>
634 <li><a href="./alter_buttons.html">Button arrangement</a></li>
635 <li><a href="./ajax.html">Ajax loaded data</a></li>
636 <li class="active"><a href="./pdf_message.html">PDF message</a></li>
637 <li><a href="./bootstrap.html">Bootstrap styling</a></li>
638 <li><a href="./jqueryui.html">jQuery UI styling</a></li>
643 <div class="epilogue">
644 <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
645 Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
646 which extend the capabilities of DataTables.</p>
648 <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
649 DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>