You mean the Tableviewer extension?
I have worked up a solution to generate a pdf from a Tableviewer table. In essence, we grab the source code for the created table, add some more javascript to it, open this in a webviewer, then download the pdf.
You will see I have adjusted the font-size of the text on the table, to ensure it fits the screen.
The webviewextra extension is also required to handle the blob download in the webviewer, which afaik, cannot be done in Tableviewer
The example blocks download a table of csv data from a google sheet.
Blocks
Script added
note that this calls in a script js file from a CDN online. This could always be downloaded to the device and fetched to the html file as an asset, allowing this activity to take place without data/internet connectivity.
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
<script>
const getBody = document.getElementsByTagName("body");
getBody[0].setAttribute("id", "body");
function downloadFunction() {
const element = document.getElementById('body');
const formattedDate = new Date().toLocaleDateString('en-GB').replace(/\//g, '-');
const options = {
margin: 10,
filename: 'FileName_' + formattedDate + '.pdf',
image: { type: 'jpeg', quality: 1.0 },
html2canvas: { scale: 4 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
};
html2pdf(element, options);
}
</script>
The pdf that is created is of images of pages, so no searchable/selectable text...
Example output
file_1734009684432.pdf (3.5 MB)
ref
Credits @Kevinkun for the Tableviewer extension