PHP - How to send HTML to other script ?

Links for php scripts

Moderators: macek, egami, gesf

Rhandyx
New php-forum User
New php-forum User
Posts: 2
Joined: Wed Feb 01, 2012 9:34 am

PHP - How to send HTML to other script ?

Postby Rhandyx » Wed Feb 01, 2012 9:48 am

Hello,

I´m trying to use tcpdf class for create pdf files.

I have lots of scripts in my site using query to mysql and I print in tables.

After parser that scripts, we have HTML code generated.

I would like to send that generated html for the browser, to another script, for generate pdf print.

Or if is possible, only few tags (some tables, div, etc)

any ideas?
Thanks

xeniar
New php-forum User
New php-forum User
Posts: 67
Joined: Tue Jan 24, 2012 1:54 pm

Re: PHP - How to send HTML to other script ?

Postby xeniar » Fri Feb 03, 2012 1:38 pm

As long as the HTML is generated in a .php page you can simply dump it all into a [session?] variable to allow PHP to move it around.

Like so:

Code: Select all

$var = "<HTML><title>HTML PAGE!</title><div>Some text</div><table<tr><td>Tables work too</td></tr></table><marquee>Any HTML will work!</marquee>";


As far as it being able to be converted into PDF from that state, I don't know as I've never dealt with PDF conversion, but if the converter class is a PHP class then I would assume it wont have too much trouble with it (as long as the converter class itself can support HTML tags that is)


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest