This topic is locked

Footer in PDFs

6/15/2024 2:02:57 PM
PHPRunner General questions
mbintex author

Is there any way to get a real footer, i.e. same content on any page of a PDF at the bottom, from a PDF generated from a view page?

I only get a content at the very end of the main content, no repetition on any page and not at the bottom of the page in the resulting PDF.

C
cristi 6/16/2024

You could use the approach described here

or

In the pdfmake documentation there is a section about header and footer here
Since PHPRunner uses pdfmake for pdf generation you could look in their documentation and adjust de json files for view or print generated in the pdf folder of your web application.

This is how the footer section looks like:

footer: [

{
table: {
location: 'below-grid',
widths: [
"*",
],
body: [

[
{
cellId: 'c1',
col:0,
row:0,
// static colspan/rowspan
"text": [

'test text - I inserted a text in the footer of each generated page and all I got is a post on this forum...',
],
"border": [ false, false, false, false ],
"alignment": 'left',
},

],

]
}
}
],
};

or

You could also use Fernando's excellent tutorials about making reports from pdf, excel, etc - pdf guide is here

mbintex author 6/16/2024

Thanks.

Well, that is the way I go - hardcoding every letter, invoice and so forth and then using the footer function of pdfmake.js.

I just wonder if there is no way to do it in Designer perhaps with a little help of custom CSS. PHPrunner does footers for reports with page numbering, but I don“t see anything like that for View pages that should be printed.