3435 Posts in 1026 Topics by 866 members
|Go to End|
16 September 2013 at 10:42am
I'm a little confused as to where I should call HTML2PDF from.
I followed this advice and HTML2PDF is working but I'm having trouble getting my head around how I can link to this.
I have made myself a non-page class that pulls the contents of a particular page and formats it in the way I want it (it's a big boring table of the contents of that page). This is fine but I can't work out how to combine the two, ie create a PDF of this HTML file that is generated with a whole load of children and other controls.
It is like I need to generate the HTML first, and then pass all that to my getPDFTimeTable(args) function (that just runs HTML2PDF on the content passed to it in the (args)). I'm just not sure how to do that. What am I missing?
16 September 2013 at 2:57pm
28 October 2013 at 5:29pm Last edited: 28 October 2013 5:41pm
Thanks for the reply, sorry for the delay.
I think my problem lies elsewhere - more to do with the basic problem of how to send my HTML to the function. ie how to put what is generated by my .ss file into a variable to pass to the function...
So I have my :
<% control TimeTable %>
<tr><th colspan='3' class='TimeTableDay'>Mondays</th></tr>
<% control AllChildren %>
<% if Day == Mondays %>
<% end_if %>
<% end_control %>
<% end_control %>
I can't put getPDFTimeTable( ) around the code above but I don't know what to do so I get all the html into a variable that I can send to the function. Am I being totally stupid?!
2 November 2013 at 9:14am
how to put what is generated by my .ss file into a variable
// parse html
$html = $this->customise($myDataObj)->renderWith($myTmpl);
// create pdf
$pdf = new DOMPDF();
$pdf->set_base_path( BASE_PATH );
|Go to Top|