export2pdf function

Exports tables to PDF files.