You can achieve this way but after it works you have to override this file
From
app\code\core\Mage\Sales\Model\Order\Pdf\Total\Default.php
in
getTotalsForDisplay() Method
public function getTotalsForDisplay()
{
$amount = $this->getOrder()->formatPriceTxt($this->getAmount());
if ($this->getAmountPrefix()) {
$amount = $this->getAmountPrefix().$amount;
}
if($this->getTitle()=="Discount") // **custom code start**
{
$label = Mage::helper('sales')->__($this->getTitle()) . '('.$this->getOrder()->getData('coupon_code').')'. ':';
}
else
{
$label = Mage::helper('sales')->__($this->getTitle()) . ':';
}
// custom code End
$fontSize = $this->getFontSize() ? $this->getFontSize() : 7;
$total = array(
'amount' => $amount,
'label' => $label,
'font_size' => $fontSize
);
return array($total);
}
Let me know if you have any query