src/Forms/GridField/OrderGridFieldDetailForm_ItemRequest.php
public function printorder()
    {
        Requirements::clear();
        //include print javascript, if print argument is provided
        if (isset($_REQUEST['print']) && $_REQUEST['print']) {
            Requirements::customScript('if(document.location.href.indexOf(\'print=1\') > 0) {window.print();}');
        }
        $title = _t('SilverShop\Model\Order.Invoice', 'Invoice');
        if ($id = $this->popupController->getRequest()->param('ID')) {
            $title .= " #$id";
        }

        return $this->record->customise(
            [
                'SiteConfig' => SiteConfig::current_site_config(),
                'Title'      => $title,
            ]
        )->renderWith('SilverShop\Admin\OrderAdmin_Printable');
    }
public function printorder()
    {
        Requirements::clear();
        //include print javascript, if print argument is provided
        if (isset($_REQUEST['print']) && $_REQUEST['print']) {
            Requirements::customScript('if(document.location.href.indexOf(\'print=1\') > 0) {window.print();}');
        }
        $title = _t('SilverShop\Model\Order.Invoice', 'Invoice');
        if ($id = $this->popupController->getRequest()->param('ID')) {
            $title .= " #$id";
        }

        return $this->record->customise(
            [
                'SiteConfig' => SiteConfig::current_site_config(),
                'Title'      => $title,
            ]
        )->renderWith('SilverShop\Admin\OrderAdmin_Printable');
    }
Render order for printing