0

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.

1
  • try render the page html in server context and then generate the pdf using the rendered html page. just an idea because i'm not know exactly how to do this using wordpress. Commented Jan 27, 2011 at 13:28

1 Answer 1

2

Hidden Forms?

<form method="post" action="la.php"><input type="hidden" name="foo" value="<?php echo $value; ?>"></form>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.