I have Print.js configured and it prints a file path (.pdf) just fine, but I wanted to make the onclick print a variable. Is this possible?
default: button type="button" onclick="printJS('docs/printjs.pdf') Print PDF
but instead something like: button type="button" onclick="printJS('echo $variable') Print PDF
I need it to call a different PDF to print each time based on a newly generated pdf filename. I'm using FPDF merge which merges html form field values into a PDF template and spits out a new filled PDF. I then use Print.js to call the newly created PDF and print it. But it's a new file each time...so I need to insert a variable somehow. Any ideas?