0

All was going swimmingly with my export to PDF feature, until item which was being exported became quite long.

    $cv_html = '
<!DOCTYPE HTML>
<table width="600px">
    <thead>
        <tr>
            <td colspan="2">
                <h1>Cv</h1>
            </td>
            <td colspan="4">
                <h2>'.$user_details['name'].'</h2>
            </td>

        </tr>

        <tr>
            <td colspan="2">
            </td>
            <td colspan="4" class="textright">

                <br>
                '.$user_details['address1'].'<br>
                '.$user_details['address2'].'<br>
                '.$user_details['city'].'<br>
                '.$user_details['county'].'<br>
                '.$user_details['postcode'].'<br>
                '.$user_details['mobile'].'
            </td>

        </tr>
    </thead>
    <tbody>

        <tr class="">
            <td class=""><br></td>
        </tr>

';  

/* Return getInvoices for EXPORT */


foreach ($ukapr->getCVsection() as $row) { 
    $hash = $row['hash'];



$cv_html .= '<tr  bgcolor="#2D9484" class="head white">
            <td colspan="3" class="white">
                '.$row['sectionname'].'
            </td>
        </tr>';



    if($ukapr->getCVrow($hash) !== null) { 
            foreach ($ukapr->getCVrow($hash) as $cvrow) {

    $cv_html .= '<tr   class="">

                <p>'.$cvrow['cvbody'].'</p>

        </tr>';

        }
    }


 }



    $cv_html .= '</tbody>
</table>

<style>

//Lots of css here

</style>
';



$ukapr->redirect('http://ukapr.co.uk/members/export_cv.php');

It exports if "

'.$cvrow['cvbody'].'

" is small, but if its long, say 400 words, it just spits out this error:

Notice: Undefined offset: 3 in /home/ukapr/public_html/dompdf/include/cellmap.cls.php on line 559 Fatal error: Call to a member function get_id() on a non-object in /home/ukapr/public_html/dompdf/include/cellmap.cls.php on line 560

Any help would be much appreciated.

4

0 回答 0