diff --git a/pdf_export.info b/pdf_export.info
index aa475c9..e290510 100755
--- a/pdf_export.info
+++ b/pdf_export.info
@@ -2,8 +2,4 @@ name = PDF Export
 description = Gives the ability to print as PDF any content.
 core = "7.x"
 
-dependencies[] = views
 dependencies[] = libraries
-
-files[] = views/pdf_export.views.inc
-files[] = views/pdf_export_views_handler_area.inc
diff --git a/pdf_export.module b/pdf_export.module
index 2713761..03711b1 100755
--- a/pdf_export.module
+++ b/pdf_export.module
@@ -233,13 +233,3 @@ function pdf_export_download($real_filename, $filename) {
 
   drupal_access_denied();
 }
-
-/**
- * Implements hook_views_api().
- */
-function pdf_export_views_api() {
-  return array(
-    'api' => 3,
-    'path' => drupal_get_path('module', 'pdf_export') . '/views',
-  );
-}
diff --git a/pdf_export_views/pdf_export_views.info b/pdf_export_views/pdf_export_views.info
new file mode 100644
index 0000000..a36632c
--- /dev/null
+++ b/pdf_export_views/pdf_export_views.info
@@ -0,0 +1,9 @@
+name = PDF Export Views
+description = Provides the ability to create a button inside the views.
+core = "7.x"
+
+dependencies[] = views
+dependencies[] = pdf_export
+
+files[] = pdf_export_views.views.inc
+files[] = pdf_export_views_handler_area.inc
diff --git a/pdf_export_views/pdf_export_views.module b/pdf_export_views/pdf_export_views.module
new file mode 100644
index 0000000..72c6a54
--- /dev/null
+++ b/pdf_export_views/pdf_export_views.module
@@ -0,0 +1,15 @@
+<?php
+/**
+ * @file
+ * PDF Export Views module.
+ */
+
+/**
+ * Implements hook_views_api().
+ */
+function pdf_export_views_views_api() {
+  return array(
+    'api' => 3,
+    'path' => drupal_get_path('module', 'pdf_export_views'),
+  );
+}
diff --git a/pdf_export_views/pdf_export_views.views.inc b/pdf_export_views/pdf_export_views.views.inc
new file mode 100755
index 0000000..e8c2d5f
--- /dev/null
+++ b/pdf_export_views/pdf_export_views.views.inc
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @file
+ * PDF Export views functions.
+ */
+
+/**
+ * Implements hook_views_data().
+ */
+function pdf_export_views_views_data() {
+  $data = array();
+
+  $data['pdf_export_views_views']['table']['group'] = t('PDF Export Views');
+  $data['pdf_export_views_views']['table']['join'] = array(
+    '#global' => array(),
+  );
+
+  $data['pdf_export_views_views']['pdf_export_views'] = array(
+    'title' => t('Export as PDF button'),
+    'help' => t('Exports the view as a PDF.'),
+    'area' => array(
+      'handler' => 'pdf_export_views_handler_area',
+    ),
+  );
+
+  return $data;
+}
diff --git a/pdf_export_views/pdf_export_views_handler_area.inc b/pdf_export_views/pdf_export_views_handler_area.inc
new file mode 100755
index 0000000..d80355e
--- /dev/null
+++ b/pdf_export_views/pdf_export_views_handler_area.inc
@@ -0,0 +1,117 @@
+<?php
+/**
+ * @file
+ * Definition of pdf_export_views_handler_area.
+ */
+
+/**
+ * PDF export area text handler.
+ *
+ * @ingroup views_area_handlers
+ */
+class pdf_export_views_handler_area extends views_handler_area {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function option_definition() {
+    $options = parent::option_definition();
+
+    $options['button_label'] = array('default' => 'Export as PDF');
+    $options['button_classes'] = array('default' => 'btn');
+    $options['pdf_name'] = array('default' => NULL);
+    $options['pdf_content_selector'] = array('default' => '.view');
+    $options['css_theme'] = array('default' => NULL);
+    $options['css_file'] = array('default' => NULL);
+
+    return $options;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $form['button_label'] = array(
+      '#title' => t('Button label'),
+      '#type' => 'textfield',
+      '#default_value' => $this->options['button_label'],
+    );
+
+    $form['button_classes'] = array(
+      '#title' => t('CSS classes'),
+      '#type' => 'textfield',
+      '#default_value' => $this->options['button_classes'],
+    );
+
+    $form['pdf_name'] = array(
+      '#title' => t('PDF name'),
+      '#description' => t("Let this field empty if you want to use the view's name. If you enter a name, you should append the .pdf at the end."),
+      '#type' => 'textfield',
+      '#default_value' => $this->options['pdf_name'],
+    );
+
+    $form['pdf_content_selector'] = array(
+      '#title' => t('PDF content selector'),
+      '#description' => t('Use the selector for the content you would like to display on PDF, you can separate it with comma and the order passed will be respected.'),
+      '#type' => 'textfield',
+      '#required' => TRUE,
+      '#default_value' => $this->options['pdf_content_selector'],
+    );
+
+    $themes = list_themes();
+    $themes_options = array();
+    foreach ($themes as $theme_name => $theme_obj) {
+      if (1 == $theme_obj->status) {
+        $themes_options[$theme_name] = $theme_name;
+      }
+    }
+    $form['css_theme'] = array(
+      '#title' => t('CSS theme'),
+      '#description' => t('The theme where the css file is.'),
+      '#type' => 'select',
+      '#options' => $themes_options,
+      '#default_value' => $this->options['css_theme'],
+    );
+
+    $form['css_file'] = array(
+      '#title' => t('CSS file'),
+      '#description' => t('The path to the css file relative to the theme path.'),
+      '#type' => 'textfield',
+      '#default_value' => $this->options['css_file'],
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function render($empty = FALSE) {
+    $button_classes = explode(' ', $this->options['button_classes']);
+    $button_classes = array_merge($button_classes, array('pdf-export'));
+
+    $pdf_name = $this->view->name . '.pdf';
+    if (!empty($this->options['pdf_name'])) {
+      $pdf_name = $this->options['pdf_name'];
+    }
+
+    return l($this->options['button_label'], 'javascript:void();', array(
+      'external' => TRUE,
+      'attributes' => array(
+        'class' => $button_classes,
+        'data-pdf' => $pdf_name,
+        'data-css-path' => $this->options['css_file'],
+        'data-css-theme' => $this->options['css_theme'],
+        'data-content-selector' => $this->options['pdf_content_selector'],
+        'title' => $this->options['button_label'],
+      ),
+    ));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function post_execute(&$values) {
+    drupal_add_js(drupal_get_path('module', 'pdf_export') . '/js/pdf_export.js');
+  }
+}
