title: Magento 2 How to override protected funtion in abstract class?
body: <p>I want to override protected function of abstract class in magento2</p>
  
  <p>here is my code</p>
  
  <p>di.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"&gt;
      &lt;preference for="Magento\Sales\Model\Order\Pdf\AbstractPdf" type="Custom\Sales\Model\Order\Pdf\AbstractPdf" /&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>AbstractPdf.php(Custom/Sales/Model/Order/Pdf/AbstractPdf.php)</p>
  
  <pre><code>&lt;?php
  /**
   * Copyright © 2016 Magento. All rights reserved.
   * See COPYING.txt for license details.
   */
  
  // @codingStandardsIgnoreFile
  
  namespace Custom\Sales\Model\Order\Pdf;
  
  // use Magento\Eav\Model\Entity\Attribute as EntityAttribute;
  // use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
  // use Magento\Framework\DB\Select;
  // use Magento\Framework\Model\AbstractModel;
  // use Magento\Framework\App\Filesystem\DirectoryList;
  // use Magento\Framework\DataObject;
  
  /**
   * Sales Order PDF abstract model
   * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
   * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
   */
  class AbstractPdf extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
  {
  
      /**
       * Insert logo to pdf page
       *
       * @param \Zend_Pdf_Page &amp;$page
       * @param null $store
       * @return void
       * @SuppressWarnings(PHPMD.CyclomaticComplexity)
       */
      protected function insertLogo(&amp;$page, $store = null)
      {
          echo "override";die;
      }
  
  }
  </code></pre>
  
  <p>I have override the core model with above mentioned file but i am unable to get the solution.</p>
  
  <p>Please help me to solve this.</p>