diff --git a/commerce_order2pdf.module b/commerce_order2pdf.module
index 9e91b29..dc7a64f 100644
--- a/commerce_order2pdf.module
+++ b/commerce_order2pdf.module
@@ -15,8 +15,7 @@ function commerce_order2pdf_requirements($phase) {
         'value' => t('Available'),
         'severity' => REQUIREMENT_OK,
       );
-    }
-    else {
+    } else {
       $requirements['mpdf_library'] = array(
         'title' => t('MPDF library'),
         'value' => t('Unavailable'),
@@ -32,29 +31,39 @@ function commerce_order2pdf_requirements($phase) {
  * Implements hook_menu().
  */
 function commerce_order2pdf_menu() {
-  $items['order2pdf/%'] = array(
+  $items['order2pdf/%commerce_order'] = array(
     'page callback' => 'commerce_order2pdf_view',
     'page arguments' => array(1),
     'access callback' => 'commerce_order2pdf_access',
     'access arguments' => array(1, 'validate'),
     'type' => MENU_CALLBACK,
   );
+  $items['admin/commerce/orders/%commerce_order/export'] = array(
+    'title' => 'pdf',
+    'page callback' => 'commerce_order2pdf_view',
+    'page arguments' => array(3),
+    'access callback' => 'commerce_order_access',
+    'access arguments' => array('view', 3),
+    'weight' => 100,
+    'type' => MENU_LOCAL_TASK,
+  );
   return $items;
 }
+
 /**
  * Implements hook_views_api().
  */
 function commerce_order2pdf_views_api() {
-    return array(
+  return array(
     'api' => 3,
     'path' => drupal_get_path('module', 'commerce_order2pdf') . '/includes/views',
-    );
+  );
 }
+
 /**
  * Implement hook_access.
  */
-function commerce_order2pdf_access($order_id, $action = 'create') {
-  $order = commerce_order_load($order_id);
+function commerce_order2pdf_access($order, $action = 'create') {
   $arg2 = arg(2);
   $hash = hash('md5', $order->order_id . $order->created);
   if ($action == 'create') {
@@ -64,7 +73,7 @@ function commerce_order2pdf_access($order_id, $action = 'create') {
     if ($arg2 == $hash) {
       return TRUE;
     }
-    if  ($arg2 != $hash) {
+    if ($arg2 != $hash) {
       drupal_set_message(t('Sorry, wrong access key. Please contact an administrator!'), 'error');
       return FALSE;
     }
@@ -88,17 +97,18 @@ function commerce_order2pdf_token_info_alter(&$data) {
 function commerce_order2pdf_tokens_alter(array &$replacements, array $context) {
   if (isset($context['data']['commerce-order'])) {
     $order = $context['data']['commerce-order'];
-   // print_r($order);
-  $hash = hash('md5', $order->order_id . $order->created);
-  $replacements['[commerce-order:hashed_pdf_link]'] =  url("order2pdf/{$order->order_id}/" . $hash, array('absolute' => TRUE));
+    // print_r($order);
+    $hash = hash('md5', $order->order_id . $order->created);
+    $replacements['[commerce-order:hashed_pdf_link]'] = url("order2pdf/{$order->order_id}/" . $hash, array('absolute' => TRUE));
   }
 //  dsm($context);
 }
+
 /**
  * Implements hook_views_data_alter().
  */
 function commerce_order2pdf_views_data_alter(&$data) {
-  if(isset($data['commerce_order2pdf_line_item'])){
+  if (isset($data['commerce_order2pdf_line_item'])) {
     $data['commerce_order2pdf_line_item']['table']['base']['access query tag'] = TRUE;
   }
 }
@@ -106,14 +116,14 @@ function commerce_order2pdf_views_data_alter(&$data) {
 /**
  * Custom function generation pdf page view.
  */
-function commerce_order2pdf_view($order_id) {
-  if(file_exists(libraries_get_path('MPDF54'))) {
+function commerce_order2pdf_view($order) {
+  if (file_exists(libraries_get_path('MPDF54'))) {
     $lib_path = libraries_get_path('MPDF54');
     include_once($lib_path . '/mpdf.php');
   }
   $mpdf = new mPDF();
   // $html must be defined
-  $html = views_embed_view('commerce_order2pdf', 'default', $order_id);
+  $html = views_embed_view('commerce_order2pdf', 'default', $order->order_id);
   $mpdf->WriteHTML($html);
-  $mpdf->Output("order_nr_$order_id.pdf", 'd');
+  $mpdf->Output("AR".$order->order_id.".pdf", 'd');
 }

warning: LF will be replaced by CRLF in commerce_order2pdf.module.
The file will have its original line endings in your working directory.
