daily pastebin goal
50%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  2.     <preference for="MagentoSalesModelOrderPdfInvoice" type="[VendorName][ModuleName]ModelOrderPdfInvoice" />
  3. </config>
  4.    
  5. /**
  6.  * Set font as regular
  7.  *
  8.  * @param  Zend_Pdf_Page $object
  9.  * @param  int $size
  10.  * @return Zend_Pdf_Resource_Font
  11.  */
  12. protected function _setFontRegular($object, $size = 7)
  13. {
  14.     $font = Zend_Pdf_Font::fontWithPath(
  15.         $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf')
  16.     );
  17.     $object->setFont($font, $size);
  18.     return $font;
  19. }
  20.  
  21. /**
  22.  * Set font as bold
  23.  *
  24.  * @param  Zend_Pdf_Page $object
  25.  * @param  int $size
  26.  * @return Zend_Pdf_Resource_Font
  27.  */
  28. protected function _setFontBold($object, $size = 7)
  29. {
  30.     $font = Zend_Pdf_Font::fontWithPath(
  31.         $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf')
  32.     );
  33.     $object->setFont($font, $size);
  34.     return $font;
  35. }
  36.  
  37. /**
  38.  * Set font as italic
  39.  *
  40.  * @param  Zend_Pdf_Page $object
  41.  * @param  int $size
  42.  * @return Zend_Pdf_Resource_Font
  43.  */
  44. protected function _setFontItalic($object, $size = 7)
  45. {
  46.     $font = Zend_Pdf_Font::fontWithPath(
  47.         $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf')
  48.     );
  49.     $object->setFont($font, $size);
  50.     return $font;
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top