Seem that you tried to follow the Magento 1 way. In Magento 2, there are no `local`, `community` code pool. We need to use [Dependency injection][1] to override the class. *app/code/Vendor/Module/etc/di.xml* <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference type="Magento\Sales\Model\Order\Pdf\Invoice" for="Vendor\Module\Model\Order\Pdf\Invoice"/> </config> *app/code/Vendor/Module/Model/Order/Pdf/Invoice.php* <?php namespace Vendor\Module\Model\Order\Pdf; class Invoice extends \Magento\Sales\Model\Order\Pdf\Invoice { //Your custom code lines } [1]: http://devdocs.magento.com/guides/v2.1/extension-dev-guide/depend-inj.html