Programmatically set view header
After some research I managed to answer my own question by implementing the hook_views_pre_view in my custom module. The method set_item is used to set the configuration of an item (field/sort/filter/etc) on a given display. The $print variable bares the content to be rendered in the view header, it is just an example and it can be replaced by anything. Apparently now I can take advantage of the Drupal API or even set/unset any view item conditionally.

/**
 * Implementation of hook_views_pre_view.
 */
function my_module_views_pre_view(&amp;$view, &amp;$display_id, &amp;$args) {

  $path = $_GET['q'];
  // Construct the print link.
  $print = l(t('Display a printer-friendly version of this page'), '/print/' . $path . '/print-friendly',  array(
    'attributes' =&gt; array(
      'class' =&gt; array('print-friendly'),
      'target' =&gt; '_blank',
      'title'=&gt; t('Display a printer-friendly version of this page.'),
      ),
    )
  );

  if ($view-&gt;name == 'my_view_name' &amp;&amp; $display_id == 'my_view_display') {
    // View's header declaration.
    $item = array(
      'id' =&gt; 'area',
      'table' =&gt; 'views',
      'field' =&gt; 'area',
      'relationship' =&gt; 'none',
      'group_type' =&gt; 'group',
      'ui_name' =&gt; '', 
      'label' =&gt; '',
      'empty' =&gt; 0,
      'content' =&gt; $print,
      'format' =&gt; 'filtered_html',
      'tokenize' =&gt; 0,
    );
    // Render the header.
    $view-&gt;set_item($display_id, 'header', 'area', $item);
  }
}