ok, I see this in the documentation:
select 'dbr.wkhtmltopdf', "--header-html ''"; /* Do not use header in export using wkhtmltopdf */
So assuming I want PDF possibility via &export=pdf, and I want PDF headers for all my reports
then please tell me if the following is correct:
I would have to do the following for every single report"
1) Add a parameter to every myDBR stored procedure, maybe called _my_html_for_header
2) Add the automatic parameter inExportFormat to every report
3) Add the following code to my reports
if (inExportFormat !='pdf') then
SELECT 'dbr.wkhtmltopdf', "--header-html _my_html_for_header "
end if;
And then I need clarification on what can be in the parameter _my_html_for_header
a) Is it just the html tags themselves right away e.g. <h1>stuff</></br><h2>more stuff</h2>
or do I need to include these tags
<!DOCTYPE html>
<html lang="en-US">
<head>
</head>
<body>
</body>
</html>
b) Do I need special handling for single or double quotes that are in this block of html
Here are questions about the alternative solution you wrote:
You can also create your own version of the default header located at mydbr/user/export_header.php.
1) Is mydbr/user/export_header.php doing anything if I haven't touched it? Do I need to enable it in environment settings?
2) Where in that file would I put something to do a simple test?
3) From that file would it work if it contained $_SESSION variables from my PHP application? My thought is maybe I can have my application store a block of HTML code in a PHP $_SESSION variable and have it be rendered there?
Any detailed comments will be appreciated.
Thanks