Unable to get the desired output on customized PDF