I'm trying to dynamically create a PDF using the TCPDF library in a document very much like this one. The output of the PDF is HTML, which I can represent with a string in a variable, as in the example above:
$html = <<<EOD
<html>bar</html>
EOD;
The content I want is Wordpress post metadata which I call within the theme using the More Fields plugin like so:
<?php more_fields('foo','','',1); ?>
...which outputs some HTML which I've specified in the plugin settings. Unless I'm wrong, I can't make that call again directly from my PDF-generating script without authoring my own plugin. So how can I use JS to send the HTML to the script from a clickable "View PDF" link? Mind you, it's a full page of text, not just a few characters, if that matters.