Forum Moderators: coopster
if (!$order->getIsVirtual())
{
if ($this->y < 250)
{
$page = $this->newPage();
}
$this->_setFontRegular($page, 6);
$page->drawText('Ship to:', 75, 222 , 'UTF-8');
$shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));
$line = 185;
$this->_setFontRegular($page, 12);
$num_lines = count($shippingAddress);
$curr_line = 0;
foreach ($shippingAddress as $value)
{
$curr_line += 1;
if ($curr_line < $num_lines)
{
if ($value!=='')
{
$value = wordwrap($value, 20, "\n");
$page->drawText(strip_tags(ltrim($value)), 75, $line, 'UTF-8');
$line -=14;
}
}
}
}