title: Magento get attribule value on pdf invoice
body: <p>I try to get a product attribute value on my invoice, but everything i tried found on stack doesn't give a result (getdata, getattribute, getressouce...)</p>
  
  <p>Below is an extract of the file, i would like to replace the last line "getname" by getattribute</p>
  
  <p>Thanks a lot </p>
  
  <pre><code>$order  = $this-&gt;getOrder();
          $item   = $this-&gt;getItem();
          $pdf    = $this-&gt;getPdf();
          $page   = $this-&gt;getPage();
          //$lines  = array();
  
          //if not only checking the height - let's check and set up page and background if needed
          if (!$returnHeight)
          {
              $blockHeight = $this-&gt;draw(true);
  
              if ($pdf-&gt;y - $blockHeight &lt; 12)
              {
                  $page = $pdf-&gt;newPage(array('table_header' =&gt; true));
                  $this-&gt;setPage($page);
              }
  
              if ($pdf-&gt;currentItemWithBg)
              {
                  $page -&gt; setFillColor(new Zend_Pdf_Color_Html('#' . $pdf -&gt; params['lightBg']));
                  $page -&gt; drawRectangle(18, $pdf -&gt; y, $page-&gt;getWidth() - 18, $pdf -&gt; y - $blockHeight, $fillType = Zend_Pdf_Page::SHAPE_DRAW_FILL);
              }
          }
  
          //get price and subtotal values
          $prices = $this-&gt;getItemPricesForDisplay();
  
          $topOffset = 10;
  
          //if there are labels leave more space at the top
          if (count($prices) &gt; 0 &amp;&amp; !empty($prices[0]['label']))
              $topOffset = 16;
  
          //slice product name into chunks
          $font = $pdf-&gt;_setFontLight($page, 9);
  
          $nameParts = $commonHelper-&gt;sliceStringByPoints($item-&gt;getName(), 191, $font, 9);  
  </code></pre>