Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
- <preference for="MagentoSalesModelOrderPdfInvoice" type="[VendorName][ModuleName]ModelOrderPdfInvoice" />
- </config>
- /**
- * Set font as regular
- *
- * @param Zend_Pdf_Page $object
- * @param int $size
- * @return Zend_Pdf_Resource_Font
- */
- protected function _setFontRegular($object, $size = 7)
- {
- $font = Zend_Pdf_Font::fontWithPath(
- $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf')
- );
- $object->setFont($font, $size);
- return $font;
- }
- /**
- * Set font as bold
- *
- * @param Zend_Pdf_Page $object
- * @param int $size
- * @return Zend_Pdf_Resource_Font
- */
- protected function _setFontBold($object, $size = 7)
- {
- $font = Zend_Pdf_Font::fontWithPath(
- $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf')
- );
- $object->setFont($font, $size);
- return $font;
- }
- /**
- * Set font as italic
- *
- * @param Zend_Pdf_Page $object
- * @param int $size
- * @return Zend_Pdf_Resource_Font
- */
- protected function _setFontItalic($object, $size = 7)
- {
- $font = Zend_Pdf_Font::fontWithPath(
- $this->_rootDirectory->getAbsolutePath('lib/internal/LinLibertineFont/LinLibertine_It-2.8.2.ttf')
- );
- $object->setFont($font, $size);
- return $font;
- }
Add Comment
Please, Sign In to add comment