2017-01-10 7 views
0

Macでdocxファイルを開くにはWORD Readerを使用します。テキストを編集することはできませんが、少なくとも開いて読んでください。そこには、コンテンツが正常に動作します。しかし、Microsoft WORDを使用してWindows上でファイルを開くと、線幅が異なり、コンテンツ全体が伸びます。phpwordで生成されたファイルのMacとWindowsで線幅が異なる

私は使用しているテーブルのためですか?ラインハイトを定義する必要はありますか?

答えて

0

は、デフォルトの値が異なる別の場所のようにテーブルの列、幅、高さを言及する必要があり

$PHPWord = new PHPWord(); 
    // document style orientation and margin 
    $sectionStyle = array('orientation' => 'landscape', 'marginLeft'=>600, 'marginRight'=>600, 'marginTop'=>600, 'marginBottom'=>600, 'colsNum' => 2); 
    $section = $PHPWord->createSection($sectionStyle); 

    // Define table style arrays 
    $styleTable = array('borderSize'=>6, 'borderColor'=>'006699', 'cellMargin'=>80, 'width'=>100); 

    // Define font style for first row 
    $fontStyle = array('bold'=>true, 'align'=>'center'); 

    // Add table style 
    $PHPWord->addTableStyle('myOwnTableStyle', $styleTable); 

    // Add table 
    $table = $section->addTable('myOwnTableStyle'); 
関連する問題