Hi, thanks for that. I downloaded the nightly build but still getting
the same issue.
Here is the code (it loops through profiles that are generated via the
database through a class called profile):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body{
margin: 0;
padding: 0;
font-family: Helvetica;
font-size: 60%;
color: #333;
}
p{
line-height: 150%;
margin-top: 3px;
font-size: 55%;
}
h1{
font-size: 200%;
margin: 0;
padding: 0;
letter-spacing: -1px;
line-height: 110%;
}
h2{
font-family: "Times New Roman", Times, serif;
font-variant: small-caps;
font-weight: normal;
margin: 5px 0 60px 0;
border-bottom: 1px solid #666;
padding: 0 0 20px 2px;
font-size: 75%;
letter-spacing: -0.25px;
}
h3{
text-transform: uppercase;
letter-spacing: -0.5px;
font-size: 100%;
padding: 0 0 5px 0;
border-bottom: 1px solid #999;
}
h4{
margin: 0 0 20px 0;
padding: 0;
font-size: 200%;
}
small{
font-variant: small-caps;
font-size: 60%;
display: block;
font-weight: bold;
margin-bottom: 4px;
}
a{
color: #06C;
}
img a{
border: none;
float: left;
}
img{
border: none;
}
</style>
</head>
<body>
<?
foreach($_SESSION['profilebasket'] as $type => $array) {
foreach($array as $id => $name) {
$profile = new profile();
$profile->setId($id);
// Get the name of the person
$profile_rs = mysql_query("SELECT * FROM profiles WHERE profile_id
= '".intval($id)."'");
if(mysql_num_rows($profile_rs) == 1) {
// For each profile add a new page
$row = mysql_fetch_assoc($profile_rs);
?>
<table border="0" width="100%" cellpadding="50" style="margin-top:
50px;">
<tr>
<td width="60%"><h1><?= $profile->getFullName(); ?> <span
class="qualifications"><?= $profile->getHonours(); ?></span></h1>
<h2><? if ( $profile->isMediator() ) { ?>IS A QUALIFIED
MEDIATOR <? } ?></h2>
<p>
<?= $profile->getProfileText(); ?>
</p></td>
<td width="3%" style="border-right:1px dotted #000000;"></td>
<td width="25%" style="padding-left:20px;">
<img src="img/pdf-logo.jpg" width="1200%" />
<br />
<? if(file_exists("profiles/" . $row['profile_id'] . ".jpg"))
{ ?>
<img width="1200%" src="profiles/<?= $row['profile_id']; ?>.jpg"
class="profileImg" alt="Image of <?= $name; ?>" />
<? } else { ?>
<img width="1200%" src="profiles/no-profile.png"
class="profileImg" alt="No profile image" />
<? } ?>
<? if ( $profile->isMediator() ) { ?>
<small>total score</small>
<h4><?= $profile->getTotalScore(); ?></h4>
<small>league table position</small>
<?= $profile->getPosition($profile->getTotalScore()); ?>
<br /><br />
<small>total mediations<br />undertaken</small>
<?= $profile->getTotalCases(); ?>
<br /><br />
<small>member level</small>
<?= $profile->getMemberLevel(); ?>
<? } ?>
<br /><br />
<small><?= $profile->getFirstName(); ?> is a<br />member of</
small>
<ul>
<?= $profile->getGroups(); ?>
</ul>
<small>phone</small>
0845 083 3000<br /><br />
</td>
</tr>
</table>
<?
}
}
}
?>
</body>
</html>
<?
$output = ob_get_contents();
ob_end_clean();
$dompdf = new DOMPDF();
$dompdf->load_html($output);
$dompdf->render();
When it calls the render() function and gets to the frame reflow
that's where is stalls. I did print out the results and flush the
cache and it looks like it's trying to render each segment of each
table cell bit by bit, and just taking forever. And this is just from
one PDF profile - imagine if I had 5 or 10!
Hope that the code I have posted here helps shed some light?
Michael
On Nov 30, 6:18 pm, BrianS <
eclecticg...@gmail.com> wrote:
> The version in the svn trunk is the latest. References to it being
> 0.5.1 should have been removed (though there's still a bit of cleaning
> up we have to do, such as the changes cataloged in
> dompdf_config.inc.php).
>
> The repository version has a lot of modifications related to speed.
> I'd definitely try that one if you are able. It sounds like you're
> comfortable using svn, but you can also download the latest code (a
> "nightly") fromhttp://
eclecticgeek.com/dompdf/