Q:

Word documnet CSS not formating properly

Trying to print a doc but the css is not correct for some reason and format is messed up.
I have my layout set like this
  <?php
    // file: app/views/layouts/msword.ctp
    header("Content-Type: application/msword");
    // header("Cache-Control: no-cache, must-revalidate"); 
    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
    header("content-disposition: attachment;filename=myfile.doc"); 
    echo $content_for_layout;
    ?>

my controller has this
public function word($id = null) {

                //debug($id);

                $pvs = $this->ProductionVault->find('all', array('conditions' => array('Contract.id' => $id)));
                $this->set('pvs',$pvs);
                $this->layout = "word";

        //Configure::write('debug',3);
    }

and finally my view has 
<?php 
echo $this->Html->css('wordcss', null, array("inline"=>false)); 
foreach($pvs as $pv):
....
....
?>

Am I missing something that the css is not coming out right?

A:

If you set "inline" => false" when calling the css method, you need a $scripts_for_layout variable in your layout, which is missing in your snippet.

